diff options
-rw-r--r-- | sys/netinet6/in6.c | 24 | ||||
-rw-r--r-- | sys/netinet6/in6.h | 3 | ||||
-rw-r--r-- | sys/netinet6/in6_ifattach.c | 4 | ||||
-rw-r--r-- | sys/netinet6/in6_var.h | 3 | ||||
-rw-r--r-- | sys/netinet6/nd6.c | 5 | ||||
-rw-r--r-- | sys/netinet6/nd6_rtr.c | 6 |
6 files changed, 6 insertions, 39 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index c0402138bbc..dbc4e49c9a8 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6.c,v 1.144 2014/11/01 21:40:39 mpi Exp $ */ +/* $OpenBSD: in6.c,v 1.145 2014/11/20 09:55:57 mpi Exp $ */ /* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */ /* @@ -2143,28 +2143,6 @@ in6if_do_dad(struct ifnet *ifp) } } -/* - * Calculate max IPv6 MTU through all the interfaces and store it - * to in6_maxmtu. - */ -void -in6_setmaxmtu(void) -{ - unsigned long maxmtu = 0; - struct ifnet *ifp; - - TAILQ_FOREACH(ifp, &ifnet, if_list) { - /* this function can be called during ifnet initialization */ - if (!ifp->if_afdata[AF_INET6]) - continue; - if ((ifp->if_flags & IFF_LOOPBACK) == 0 && - IN6_LINKMTU(ifp) > maxmtu) - maxmtu = IN6_LINKMTU(ifp); - } - if (maxmtu) /* update only when maxmtu is positive */ - in6_maxmtu = maxmtu; -} - void * in6_domifattach(struct ifnet *ifp) { diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h index 5c1ecedf9e8..f47d81b7718 100644 --- a/sys/netinet6/in6.h +++ b/sys/netinet6/in6.h @@ -1,4 +1,4 @@ -/* $OpenBSD: in6.h,v 1.75 2014/08/31 19:20:44 bluhm Exp $ */ +/* $OpenBSD: in6.h,v 1.76 2014/11/20 09:55:57 mpi Exp $ */ /* $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ */ /* @@ -420,7 +420,6 @@ typedef __socklen_t socklen_t; /* length type for network syscalls */ extern u_char inet6ctlerrmap[]; extern struct ifqueue ip6intrq; /* IP6 packet input queue */ extern struct in6_addr zeroin6_addr; -extern unsigned long in6_maxmtu; struct cmsghdr; diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index 2a50c27f3ea..fe05089ae30 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_ifattach.c,v 1.76 2014/11/18 23:55:01 krw Exp $ */ +/* $OpenBSD: in6_ifattach.c,v 1.77 2014/11/20 09:55:57 mpi Exp $ */ /* $KAME: in6_ifattach.c,v 1.124 2001/07/18 08:32:51 jinmei Exp $ */ /* @@ -57,8 +57,6 @@ #include <netinet6/ip6_mroute.h> #endif -unsigned long in6_maxmtu = 0; - int ip6_auto_linklocal = 1; /* enable by default */ int get_last_resort_ifid(struct ifnet *, struct in6_addr *); diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index d2c444617d9..a9b2b6f4beb 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_var.h,v 1.50 2014/08/25 14:00:34 florian Exp $ */ +/* $OpenBSD: in6_var.h,v 1.51 2014/11/20 09:55:57 mpi Exp $ */ /* $KAME: in6_var.h,v 1.55 2001/02/16 12:49:45 itojun Exp $ */ /* @@ -514,7 +514,6 @@ int in6_update_ifa(struct ifnet *, struct in6_aliasreq *, struct in6_ifaddr *); void in6_purgeaddr(struct ifaddr *); int in6if_do_dad(struct ifnet *); -void in6_setmaxmtu(void); void *in6_domifattach(struct ifnet *); void in6_domifdetach(struct ifnet *, void *); struct in6_ifaddr *in6ifa_ifpforlinklocal(struct ifnet *, int); diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 088ff5ef64d..6e30f79cf12 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6.c,v 1.125 2014/11/18 02:37:31 tedu Exp $ */ +/* $OpenBSD: nd6.c,v 1.126 2014/11/20 09:55:57 mpi Exp $ */ /* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */ /* @@ -199,9 +199,6 @@ nd6_setmtu0(struct ifnet *ifp, struct nd_ifinfo *ndi) "new link MTU on %s (%lu) is too small for IPv6\n", ifp->if_xname, (unsigned long)ndi->maxmtu); } - - if (ndi->maxmtu > in6_maxmtu) - in6_setmaxmtu(); /* check all interfaces just in case */ } void diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index c809f2ce311..ba16368ca7f 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6_rtr.c,v 1.90 2014/11/18 02:37:31 tedu Exp $ */ +/* $OpenBSD: nd6_rtr.c,v 1.91 2014/11/20 09:55:57 mpi Exp $ */ /* $KAME: nd6_rtr.c,v 1.97 2001/02/07 11:09:13 itojun Exp $ */ /* @@ -460,11 +460,7 @@ nd6_ra_input(struct mbuf *m, int off, int icmp6len) maxmtu = (ndi->maxmtu && ndi->maxmtu < ifp->if_mtu) ? ndi->maxmtu : ifp->if_mtu; if (mtu <= maxmtu) { - int change = (ndi->linkmtu != mtu); - ndi->linkmtu = mtu; - if (change) /* in6_maxmtu may change */ - in6_setmaxmtu(); } else { nd6log((LOG_INFO, "nd6_ra_input: bogus mtu " "mtu=%lu sent from %s; " |