Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F112562866
D49357.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
D49357.diff
View Options
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -2104,31 +2104,6 @@
return (1);
}
-/*
- * Calculate max IPv6 MTU through all the interfaces and store it
- * to in6_maxmtu.
- */
-void
-in6_setmaxmtu(void)
-{
- struct epoch_tracker et;
- unsigned long maxmtu = 0;
- struct ifnet *ifp;
-
- NET_EPOCH_ENTER(et);
- CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) {
- /* 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);
- }
- NET_EPOCH_EXIT(et);
- if (maxmtu) /* update only when maxmtu is positive */
- V_in6_maxmtu = maxmtu;
-}
-
/*
* Provide the length of interface identifiers to be used for the link attached
* to the given interface. The length should be defined in "IPv6 over
diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c
--- a/sys/netinet6/in6_ifattach.c
+++ b/sys/netinet6/in6_ifattach.c
@@ -70,8 +70,6 @@
#include <netinet6/mld6_var.h>
#include <netinet6/scope6_var.h>
-VNET_DEFINE(unsigned long, in6_maxmtu) = 0;
-
#ifdef IP6_AUTO_LINKLOCAL
VNET_DEFINE(int, ip6_auto_linklocal) = IP6_AUTO_LINKLOCAL;
#else
@@ -731,10 +729,6 @@
else
ifa_free(&ia->ia_ifa);
}
-
- /* update dynamically. */
- if (V_in6_maxmtu < ifp->if_mtu)
- V_in6_maxmtu = ifp->if_mtu;
}
/*
diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h
--- a/sys/netinet6/in6_var.h
+++ b/sys/netinet6/in6_var.h
@@ -549,9 +549,6 @@
((ifp)->if_afdata[AF_INET6]))->in6_ifstat[ \
offsetof(struct in6_ifstat, tag) / sizeof(uint64_t)], 1);\
} while (/*CONSTCOND*/ 0)
-
-VNET_DECLARE(unsigned long, in6_maxmtu);
-#define V_in6_maxmtu VNET(in6_maxmtu)
#endif /* _KERNEL */
/*
@@ -875,7 +872,6 @@
int in6_domifmtu(struct ifnet *);
struct rib_head *in6_inithead(uint32_t fibnum);
void in6_detachhead(struct rib_head *rh);
-void in6_setmaxmtu(void);
int in6_if2idlen(struct ifnet *);
struct in6_ifaddr *in6ifa_ifpforlinklocal(struct ifnet *, int);
struct in6_ifaddr *in6ifa_ifpwithaddr(struct ifnet *, const struct in6_addr *);
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -379,10 +379,6 @@
"new link MTU on %s (%lu) is too small for IPv6\n",
if_name(ifp), (unsigned long)ndi->maxmtu);
}
-
- if (ndi->maxmtu > V_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
--- a/sys/netinet6/nd6_rtr.c
+++ b/sys/netinet6/nd6_rtr.c
@@ -556,11 +556,8 @@
int change = (ndi->linkmtu != mtu);
ndi->linkmtu = mtu;
- if (change) {
- /* in6_maxmtu may change */
- in6_setmaxmtu();
+ if (change)
rt_updatemtu(ifp);
- }
} else {
nd6log((LOG_INFO, "%s: bogus mtu=%lu sent from %s; "
"exceeds maxmtu %lu, ignoring\n", __func__,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 20, 9:18 PM (18 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17234872
Default Alt Text
D49357.diff (2 KB)
Attached To
Mode
D49357: netinet6: Remove set but not used global variable in6_maxmtu
Attached
Detach File
Event Timeline
Log In to Comment