FreeBSD Bugzilla – Attachment 148784 Details for
Bug 188032
[lo] IPv6 on lo never leaves 'tentative' state if configured with prefixlen 128
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
A patch to automatically clear ifdisabled flag even in /128 case
in6_128_ifdisabled.diff (text/plain), 2.18 KB, created by
Hiroki Sato
on 2014-10-30 02:43:20 UTC
(
hide
)
Description:
A patch to automatically clear ifdisabled flag even in /128 case
Filename:
MIME Type:
Creator:
Hiroki Sato
Created:
2014-10-30 02:43:20 UTC
Size:
2.18 KB
patch
obsolete
>Index: sys/netinet6/in6.c >=================================================================== >--- sys/netinet6/in6.c (revision 273841) >+++ sys/netinet6/in6.c (working copy) >@@ -638,7 +638,8 @@ in6_control(struct socket *so, u_long cmd, caddr_t > pr0.ndpr_plen = in6_mask2len(&ifra->ifra_prefixmask.sin6_addr, > NULL); > if (pr0.ndpr_plen == 128) { >- break; /* we don't need to install a host route. */ >+ /* we don't need to install a host route. */ >+ goto aifaddr_out; > } > pr0.ndpr_prefix = ifra->ifra_addr; > /* apply the mask for safety. */ >@@ -705,32 +706,29 @@ in6_control(struct socket *so, u_long cmd, caddr_t > * that is, this address might make other addresses detached. > */ > pfxlist_onlink_check(); >- if (error == 0 && ia) { >- if (ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) { >- /* >- * Try to clear the flag when a new >- * IPv6 address is added onto an >- * IFDISABLED interface and it >- * succeeds. >- */ >- struct in6_ndireq nd; >+aifaddr_out: >+ if (error != 0 || ia == NULL) >+ break; >+ /* >+ * Try to clear the flag when a new IPv6 address is added >+ * onto an IFDISABLED interface and it succeeds. >+ */ >+ if (ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) { >+ struct in6_ndireq nd; > >- memset(&nd, 0, sizeof(nd)); >- nd.ndi.flags = ND_IFINFO(ifp)->flags; >- nd.ndi.flags &= ~ND6_IFF_IFDISABLED; >- if (nd6_ioctl(SIOCSIFINFO_FLAGS, >- (caddr_t)&nd, ifp) < 0) >- log(LOG_NOTICE, "SIOCAIFADDR_IN6: " >- "SIOCSIFINFO_FLAGS for -ifdisabled " >- "failed."); >- /* >- * Ignore failure of clearing the flag >- * intentionally. The failure means >- * address duplication was detected. >- */ >- } >- EVENTHANDLER_INVOKE(ifaddr_event, ifp); >+ memset(&nd, 0, sizeof(nd)); >+ nd.ndi.flags = ND_IFINFO(ifp)->flags; >+ nd.ndi.flags &= ~ND6_IFF_IFDISABLED; >+ if (nd6_ioctl(SIOCSIFINFO_FLAGS, (caddr_t)&nd, ifp) < 0) >+ log(LOG_NOTICE, "SIOCAIFADDR_IN6: " >+ "SIOCSIFINFO_FLAGS for -ifdisabled " >+ "failed."); >+ /* >+ * Ignore failure of clearing the flag intentionally. >+ * The failure means address duplication was detected. >+ */ > } >+ EVENTHANDLER_INVOKE(ifaddr_event, ifp); > break; > } >
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 188032
: 148784