summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/ip6_mroute.c
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2015-10-28 12:14:25 +0000
committerflorian <florian@openbsd.org>2015-10-28 12:14:25 +0000
commita923c8476c6771493ee2bc4f277a429c9ae3eaff (patch)
tree0ce39e85d1a8d040b51bfbaf124adc5a92525b3a /sys/netinet6/ip6_mroute.c
parentsync (diff)
downloadwireguard-openbsd-a923c8476c6771493ee2bc4f277a429c9ae3eaff.tar.xz
wireguard-openbsd-a923c8476c6771493ee2bc4f277a429c9ae3eaff.zip
Remove linkmtu and maxmtu from struct nd_ifinfo. IN6_LINKMTU can now
die and ifp->if_mtu is the one true mtu. Suggested by and OK mpi@
Diffstat (limited to 'sys/netinet6/ip6_mroute.c')
-rw-r--r--sys/netinet6/ip6_mroute.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c
index 0474319fc53..22be5890e39 100644
--- a/sys/netinet6/ip6_mroute.c
+++ b/sys/netinet6/ip6_mroute.c
@@ -1512,7 +1512,6 @@ phyint_send6(struct ip6_hdr *ip6, struct mif6 *mifp, struct mbuf *m)
static struct route_in6 ro;
struct in6_multi *in6m;
struct sockaddr_in6 *dst6;
- u_long linkmtu;
/*
* Make a new reference to the packet; make sure that
@@ -1572,8 +1571,7 @@ phyint_send6(struct ip6_hdr *ip6, struct mif6 *mifp, struct mbuf *m)
* Put the packet into the sending queue of the outgoing interface
* if it would fit in the MTU of the interface.
*/
- linkmtu = IN6_LINKMTU(ifp);
- if (mb_copy->m_pkthdr.len <= linkmtu || linkmtu < IPV6_MMTU) {
+ if (mb_copy->m_pkthdr.len <= ifp->if_mtu || ifp->if_mtu < IPV6_MMTU) {
dst6->sin6_len = sizeof(struct sockaddr_in6);
dst6->sin6_family = AF_INET6;
dst6->sin6_addr = ip6->ip6_dst;
@@ -1590,7 +1588,8 @@ phyint_send6(struct ip6_hdr *ip6, struct mif6 *mifp, struct mbuf *m)
#endif
} else {
if (ip6_mcast_pmtu)
- icmp6_error(mb_copy, ICMP6_PACKET_TOO_BIG, 0, linkmtu);
+ icmp6_error(mb_copy, ICMP6_PACKET_TOO_BIG, 0,
+ ifp->if_mtu);
else {
#ifdef MRT6DEBUG
char src[INET6_ADDRSTRLEN], dst[INET6_ADDRSTRLEN];