Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-doc
Path: blob/main/website/static/security/patches/EN-06:02/net.patch
18096 views
1
Index: sys/netinet/ip_output.c
2
===================================================================
3
RCS file: /home/cvs/src/sys/netinet/ip_output.c,v
4
retrieving revision 1.242.2.8
5
diff -u -r1.242.2.8 ip_output.c
6
--- sys/netinet/ip_output.c 31 Jan 2006 16:06:05 -0000 1.242.2.8
7
+++ sys/netinet/ip_output.c 25 Aug 2006 15:07:44 -0000
8
@@ -1162,6 +1162,9 @@
9
return (EINVAL);
10
}
11
12
+ if (inp == NULL)
13
+ return (EINVAL);
14
+
15
switch (sopt->sopt_dir) {
16
case SOPT_SET:
17
switch (sopt->sopt_name) {
18
Index: sys/netinet6/in6.c
19
===================================================================
20
RCS file: /home/cvs/src/sys/netinet6/in6.c,v
21
retrieving revision 1.51.2.8
22
diff -u -r1.51.2.8 in6.c
23
--- sys/netinet6/in6.c 9 Mar 2006 11:59:03 -0000 1.51.2.8
24
+++ sys/netinet6/in6.c 25 Aug 2006 15:07:56 -0000
25
@@ -1720,20 +1720,55 @@
26
27
/* we could do in(6)_socktrim here, but just omit it at this moment. */
28
29
+ if (newhost && nd6_need_cache(ifp) != 0) {
30
+ /* set the rtrequest function to create llinfo */
31
+ ia->ia_ifa.ifa_rtrequest = nd6_rtrequest;
32
+ }
33
+
34
/*
35
* Special case:
36
* If a new destination address is specified for a point-to-point
37
* interface, install a route to the destination as an interface
38
- * direct route.
39
+ * direct route. In addition, if the link is expected to have neighbor
40
+ * cache entries, specify RTF_LLINFO so that a cache entry for the
41
+ * destination address will be created.
42
+ * created
43
* XXX: the logic below rejects assigning multiple addresses on a p2p
44
- * interface that share a same destination.
45
+ * interface that share the same destination.
46
*/
47
plen = in6_mask2len(&ia->ia_prefixmask.sin6_addr, NULL); /* XXX */
48
if (!(ia->ia_flags & IFA_ROUTE) && plen == 128 &&
49
ia->ia_dstaddr.sin6_family == AF_INET6) {
50
- if ((error = rtinit(&(ia->ia_ifa), (int)RTM_ADD,
51
- RTF_UP | RTF_HOST)) != 0)
52
+ int rtflags = RTF_UP | RTF_HOST;
53
+ struct rtentry *rt = NULL, **rtp = NULL;
54
+
55
+ if (nd6_need_cache(ifp) != 0) {
56
+ rtflags |= RTF_LLINFO;
57
+ rtp = &rt;
58
+ }
59
+
60
+ error = rtrequest(RTM_ADD, (struct sockaddr *)&ia->ia_dstaddr,
61
+ (struct sockaddr *)&ia->ia_addr,
62
+ (struct sockaddr *)&ia->ia_prefixmask,
63
+ ia->ia_flags | rtflags, rtp);
64
+ if (error != 0)
65
return (error);
66
+ if (rt != NULL) {
67
+ struct llinfo_nd6 *ln;
68
+
69
+ RT_LOCK(rt);
70
+ ln = (struct llinfo_nd6 *)rt->rt_llinfo;
71
+ if (ln != NULL) {
72
+ /*
73
+ * Set the state to STALE because we don't
74
+ * have to perform address resolution on this
75
+ * link.
76
+ */
77
+ ln->ln_state = ND6_LLINFO_STALE;
78
+ }
79
+ RT_REMREF(rt);
80
+ RT_UNLOCK(rt);
81
+ }
82
ia->ia_flags |= IFA_ROUTE;
83
}
84
if (plen < 128) {
85
@@ -1744,11 +1779,8 @@
86
}
87
88
/* Add ownaddr as loopback rtentry, if necessary (ex. on p2p link). */
89
- if (newhost) {
90
- /* set the rtrequest function to create llinfo */
91
- ia->ia_ifa.ifa_rtrequest = nd6_rtrequest;
92
+ if (newhost)
93
in6_ifaddloop(&(ia->ia_ifa));
94
- }
95
96
return (error);
97
}
98
Index: sys/netinet6/nd6.c
99
===================================================================
100
RCS file: /home/cvs/src/sys/netinet6/nd6.c,v
101
retrieving revision 1.48.2.12
102
diff -u -r1.48.2.12 nd6.c
103
--- sys/netinet6/nd6.c 29 Mar 2006 21:05:11 -0000 1.48.2.12
104
+++ sys/netinet6/nd6.c 25 Aug 2006 15:08:02 -0000
105
@@ -512,6 +512,19 @@
106
ln->ln_asked++;
107
nd6_llinfo_settimer(ln, (long)ndi->retrans * hz / 1000);
108
nd6_ns_output(ifp, dst, dst, ln, 0);
109
+ } else if (rt->rt_ifa != NULL &&
110
+ rt->rt_ifa->ifa_addr->sa_family == AF_INET6 &&
111
+ (((struct in6_ifaddr *)rt->rt_ifa)->ia_flags & IFA_ROUTE)) {
112
+ /*
113
+ * This is an unreachable neighbor whose address is
114
+ * specified as the destination of a p2p interface
115
+ * (see in6_ifinit()). We should not free the entry
116
+ * since this is sort of a "static" entry generated
117
+ * via interface address configuration.
118
+ */
119
+ ln->ln_asked = 0;
120
+ ln->ln_expire = 0; /* make it permanent */
121
+ ln->ln_state = ND6_LLINFO_STALE;
122
} else {
123
(void)nd6_free(rt, 0);
124
ln = NULL;
125
Index: sys/vm/uma_core.c
126
===================================================================
127
RCS file: /home/cvs/src/sys/vm/uma_core.c,v
128
retrieving revision 1.119.2.15
129
diff -u -r1.119.2.15 uma_core.c
130
--- sys/vm/uma_core.c 14 Feb 2006 03:37:58 -0000 1.119.2.15
131
+++ sys/vm/uma_core.c 25 Aug 2006 15:08:12 -0000
132
@@ -2417,8 +2417,7 @@
133
* If nothing else caught this, we'll just do an internal free.
134
*/
135
zfree_internal:
136
- uma_zfree_internal(zone, item, udata, SKIP_DTOR, ZFREE_STATFAIL |
137
- ZFREE_STATFREE);
138
+ uma_zfree_internal(zone, item, udata, SKIP_DTOR, ZFREE_STATFREE);
139
140
return;
141
}
142
143