FreeBSD Bugzilla – Attachment 199377 Details for
Bug 233283
IPv6 routing problem when using FreeBSD as a VPS at a cloud provider
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
nd6.diff (text/plain), 1.24 KB, created by
Andrey V. Elsukov
on 2018-11-20 12:04:17 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Andrey V. Elsukov
Created:
2018-11-20 12:04:17 UTC
Size:
1.24 KB
patch
obsolete
>diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c >index 388e48879b1..5de5f2def86 100644 >--- a/sys/netinet6/nd6.c >+++ b/sys/netinet6/nd6.c >@@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); > #include <netinet/ip6.h> > #include <netinet6/ip6_var.h> > #include <netinet6/scope6_var.h> >+#include <netinet6/in6_fib.h> > #include <netinet6/nd6.h> > #include <netinet6/in6_ifattach.h> > #include <netinet/icmp6.h> >@@ -1377,8 +1378,9 @@ nd6_is_new_addr_neighbor(const struct sockaddr_in6 *addr, struct ifnet *ifp) > int > nd6_is_addr_neighbor(const struct sockaddr_in6 *addr, struct ifnet *ifp) > { >+ struct nhop6_basic nh6; > struct llentry *lle; >- int rc = 0; >+ int fibnum, rc = 0; > > IF_AFDATA_UNLOCK_ASSERT(ifp); > if (nd6_is_new_addr_neighbor(addr, ifp)) >@@ -1394,6 +1396,21 @@ nd6_is_addr_neighbor(const struct sockaddr_in6 *addr, struct ifnet *ifp) > rc = 1; > } > IF_AFDATA_RUNLOCK(ifp); >+ >+ /* >+ * Check that address is in the routing table. >+ * This covers non-prefix on-link INET6 routes. >+ */ >+ if (rc == 0) { >+ fibnum = V_rt_add_addr_allfibs ? RT_DEFAULT_FIB: ifp->if_fib; >+ rc = fib6_lookup_nh_basic(fibnum, >+ &addr->sin6_addr, 0, 0, 0, &nh6); >+ if (rc || (nh6.nh_flags & NHF_GATEWAY) || ifp != nh6.nh_ifp) >+ rc = 0; >+ else >+ rc = 1; >+ } >+ > return (rc); > } >
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 233283
: 199377