Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105746726
D19751.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D19751.diff
View Options
Index: head/sys/net/if_stf.c
===================================================================
--- head/sys/net/if_stf.c
+++ head/sys/net/if_stf.c
@@ -724,6 +724,7 @@
}
ifp->if_flags |= IFF_UP;
+ ifp->if_drv_flags |= IFF_DRV_RUNNING;
break;
case SIOCADDMULTI:
Index: head/sys/netinet6/in6.c
===================================================================
--- head/sys/netinet6/in6.c
+++ head/sys/netinet6/in6.c
@@ -1951,26 +1951,14 @@
int
in6if_do_dad(struct ifnet *ifp)
{
+
if ((ifp->if_flags & IFF_LOOPBACK) != 0)
return (0);
-
- if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) ||
- (ND_IFINFO(ifp)->flags & ND6_IFF_NO_DAD))
+ if ((ifp->if_flags & IFF_MULTICAST) == 0)
return (0);
-
- /*
- * Our DAD routine requires the interface up and running.
- * However, some interfaces can be up before the RUNNING
- * status. Additionally, users may try to assign addresses
- * before the interface becomes up (or running).
- * This function returns EAGAIN in that case.
- * The caller should mark "tentative" on the address instead of
- * performing DAD immediately.
- */
- if (!((ifp->if_flags & IFF_UP) &&
- (ifp->if_drv_flags & IFF_DRV_RUNNING)))
- return (EAGAIN);
-
+ if ((ND_IFINFO(ifp)->flags &
+ (ND6_IFF_IFDISABLED | ND6_IFF_NO_DAD)) != 0)
+ return (0);
return (1);
}
Index: head/sys/netinet6/in6_ifattach.c
===================================================================
--- head/sys/netinet6/in6_ifattach.c
+++ head/sys/netinet6/in6_ifattach.c
@@ -692,6 +692,7 @@
* it is rather harmful to have one.
*/
ND_IFINFO(ifp)->flags &= ~ND6_IFF_AUTO_LINKLOCAL;
+ ND_IFINFO(ifp)->flags |= ND6_IFF_NO_DAD;
break;
default:
break;
Index: head/sys/netinet6/nd6.c
===================================================================
--- head/sys/netinet6/nd6.c
+++ head/sys/netinet6/nd6.c
@@ -900,6 +900,7 @@
struct nd_prhead prl;
struct nd_defrouter *dr, *ndr;
struct nd_prefix *pr, *npr;
+ struct ifnet *ifp;
struct in6_ifaddr *ia6, *nia6;
uint64_t genid;
@@ -996,14 +997,15 @@
* Check status of the interface. If it is down,
* mark the address as tentative for future DAD.
*/
- if ((ia6->ia_ifp->if_flags & IFF_UP) == 0 ||
- (ia6->ia_ifp->if_drv_flags & IFF_DRV_RUNNING)
- == 0 ||
- (ND_IFINFO(ia6->ia_ifp)->flags &
- ND6_IFF_IFDISABLED) != 0) {
+ ifp = ia6->ia_ifp;
+ if ((ND_IFINFO(ifp)->flags & ND6_IFF_NO_DAD) == 0 &&
+ ((ifp->if_flags & IFF_UP) == 0 ||
+ (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 ||
+ (ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) != 0)){
ia6->ia6_flags &= ~IN6_IFF_DUPLICATED;
ia6->ia6_flags |= IN6_IFF_TENTATIVE;
}
+
/*
* A new RA might have made a deprecated address
* preferred.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 1:54 AM (17 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15537086
Default Alt Text
D19751.diff (2 KB)
Attached To
Mode
D19751: Do not perform DAD on stf(4) interfaces.
Attached
Detach File
Event Timeline
Log In to Comment