diff options
author | hrs <hrs@FreeBSD.org> | 2013-07-31 16:24:49 +0000 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2013-07-31 16:24:49 +0000 |
commit | 64e5ea06531a17c184bfb8319a36165135f613c5 (patch) | |
tree | 53fdee48ca3460bd33377932da455eae2ecfd826 /sys/netinet6/in6_ifattach.c | |
parent | 8ceb091210c8542007672f9ee2739bafbc4eb453 (diff) | |
download | FreeBSD-src-64e5ea06531a17c184bfb8319a36165135f613c5.zip FreeBSD-src-64e5ea06531a17c184bfb8319a36165135f613c5.tar.gz |
Allocate in6_ifextra (ifp->if_afdata[AF_INET6]) only for IPv6-capable
interfaces. This eliminates unnecessary IPv6 processing for non-IPv6
interfaces.
MFC after: 3 days
Diffstat (limited to 'sys/netinet6/in6_ifattach.c')
-rw-r--r-- | sys/netinet6/in6_ifattach.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index 674356a..9e089d9 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -724,15 +724,8 @@ in6_ifattach(struct ifnet *ifp, struct ifnet *altifp) struct in6_ifaddr *ia; struct in6_addr in6; - /* some of the interfaces are inherently not IPv6 capable */ - switch (ifp->if_type) { - case IFT_PFLOG: - case IFT_PFSYNC: - ND_IFINFO(ifp)->flags &= ~ND6_IFF_AUTO_LINKLOCAL; - ND_IFINFO(ifp)->flags |= ND6_IFF_IFDISABLED; + if (ifp->if_afdata[AF_INET6] == NULL) return; - } - /* * quirks based on interface type */ |