summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/ip6_mroute.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/ip6_mroute.c
parent1ebf2012445124bd775073056a9019ead10872fa (diff)
downloadFreeBSD-src-1bfb4986099befab26dc0c1e40e47e89f92f62fb.zip
FreeBSD-src-1bfb4986099befab26dc0c1e40e47e89f92f62fb.tar.gz
correct linkmtu handling.
Obtained from: KAME
Diffstat (limited to 'sys/netinet6/ip6_mroute.c')
-rw-r--r--sys/netinet6/ip6_mroute.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c
index eeb9b21..607a2ea 100644
--- a/sys/netinet6/ip6_mroute.c
+++ b/sys/netinet6/ip6_mroute.c
@@ -113,6 +113,7 @@
#include <netinet/ip6.h>
#include <netinet6/ip6_var.h>
+#include <netinet6/nd6.h>
#include <netinet6/ip6_mroute.h>
#include <netinet6/pim6.h>
#include <netinet6/pim6_var.h>
@@ -1454,6 +1455,7 @@ phyint_send(ip6, mifp, 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
@@ -1513,7 +1515,8 @@ phyint_send(ip6, mifp, m)
* Put the packet into the sending queue of the outgoing interface
* if it would fit in the MTU of the interface.
*/
- if (mb_copy->m_pkthdr.len <= ifp->if_mtu || ifp->if_mtu < IPV6_MMTU) {
+ linkmtu = IN6_LINKMTU(ifp);
+ if (mb_copy->m_pkthdr.len <= linkmtu || linkmtu < IPV6_MMTU) {
dst6->sin6_len = sizeof(struct sockaddr_in6);
dst6->sin6_family = AF_INET6;
dst6->sin6_addr = ip6->ip6_dst;
@@ -1530,7 +1533,7 @@ phyint_send(ip6, mifp, m)
#endif
} else {
#ifdef MULTICAST_PMTUD
- icmp6_error(mb_copy, ICMP6_PACKET_TOO_BIG, 0, ifp->if_mtu);
+ icmp6_error(mb_copy, ICMP6_PACKET_TOO_BIG, 0, linkmtu);
#else
#ifdef MRT6DEBUG
if (mrt6debug & DEBUG_XMIT)
OpenPOWER on IntegriCloud