summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/in6.c
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2003-10-20 15:27:48 +0000
committerume <ume@FreeBSD.org>2003-10-20 15:27:48 +0000
commit1bfb4986099befab26dc0c1e40e47e89f92f62fb (patch)
tree9f0a5ced322cdbe6ab2dbce0993f3b61ac529326 /sys/netinet6/in6.c
parent1ebf2012445124bd775073056a9019ead10872fa (diff)
downloadFreeBSD-src-1bfb4986099befab26dc0c1e40e47e89f92f62fb.zip
FreeBSD-src-1bfb4986099befab26dc0c1e40e47e89f92f62fb.tar.gz
correct linkmtu handling.
Obtained from: KAME
Diffstat (limited to 'sys/netinet6/in6.c')
-rw-r--r--sys/netinet6/in6.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index d1c5f8c..83b5913 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -2288,9 +2288,12 @@ in6_setmaxmtu()
IFNET_RLOCK();
for (ifp = TAILQ_FIRST(&ifnet); ifp; ifp = TAILQ_NEXT(ifp, if_list)) {
+ /* this function can be called during ifnet initialization */
+ if (!ifp->if_afdata[AF_INET6])
+ continue;
if ((ifp->if_flags & IFF_LOOPBACK) == 0 &&
- ND_IFINFO(ifp)->linkmtu > maxmtu)
- maxmtu = ND_IFINFO(ifp)->linkmtu;
+ IN6_LINKMTU(ifp) > maxmtu)
+ maxmtu = IN6_LINKMTU(ifp);
}
IFNET_RUNLOCK();
if (maxmtu) /* update only when maxmtu is positive */
OpenPOWER on IntegriCloud