FreeBSD Bugzilla – Attachment 148500 Details for
Bug 194485
Userland cannot add IPv6 prefix routes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Allow userland to submit IPv6 prefix routes
freebsd-nd6-userland-routes.diff (text/plain), 1.03 KB, created by
roy
on 2014-10-20 13:21:13 UTC
(
hide
)
Description:
Allow userland to submit IPv6 prefix routes
Filename:
MIME Type:
Creator:
roy
Created:
2014-10-20 13:21:13 UTC
Size:
1.03 KB
patch
obsolete
>--- nd6.c.orig 2014-10-13 16:22:14.000000000 +0100 >+++ nd6.c 2014-10-14 10:33:16.000000000 +0100 >@@ -875,6 +875,8 @@ > { > struct nd_prefix *pr; > struct ifaddr *dstaddr; >+ struct rtentry *rt; >+ int retval; > > /* > * A link-local address is always a neighbor. >@@ -910,8 +912,6 @@ > continue; > > if (!(pr->ndpr_stateflags & NDPRF_ONLINK)) { >- struct rtentry *rt; >- > /* Always use the default FIB here. */ > rt = in6_rtalloc1((struct sockaddr *)&pr->ndpr_prefix, > 0, 0, RT_DEFAULT_FIB); >@@ -963,7 +963,21 @@ > return (1); > } > >- return (0); >+ /* Check for a matching non static route which userland may have >+ * added. This is the only check we can make because RTF_CLONING >+ * was dropped. */ >+ rt = in6_rtalloc1((struct sockaddr *)addr, 0, 0, RT_DEFAULT_FIB); >+ if (rt == NULL) >+ return (0); >+ if (!(rt->rt_flags & RTF_STATIC) && >+ (rt->rt_ifp == ifp || >+ rt->rt_ifp->if_bridge == ifp->if_bridge)) >+ /* XXX Check matching carp device? */ >+ retval = 1; >+ else >+ retval = 0; >+ RTFREE_LOCKED(rt); >+ return (retval); > } > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 194485
:
148500