diff options
author | Hajimu UMEMOTO <ume@FreeBSD.org> | 2005-08-13 19:55:06 +0000 |
---|---|---|
committer | Hajimu UMEMOTO <ume@FreeBSD.org> | 2005-08-13 19:55:06 +0000 |
commit | 5af09736a8ad3c7bfec259f386c6752260fea93c (patch) | |
tree | 8ea1ca2a7aaf2437bf4a4cf601629fcdade3c414 /sys/netinet6/ip6_mroute.c | |
parent | d24cff0fb03102befd8f41063b60f32d8305e2c8 (diff) | |
download | src-5af09736a8ad3c7bfec259f386c6752260fea93c.tar.gz src-5af09736a8ad3c7bfec259f386c6752260fea93c.zip |
added a knob to enable path MTU discovery for multicast packets.
(by default, it is disabled)
Submitted by: suz
Obtained from: KAME
Notes
Notes:
svn path=/head/; revision=149033
Diffstat (limited to 'sys/netinet6/ip6_mroute.c')
-rw-r--r-- | sys/netinet6/ip6_mroute.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index 9c196605cb1e..7a87d8d2cf97 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -106,6 +106,7 @@ #include <netinet/in.h> #include <netinet/in_var.h> +#include <netinet/icmp6.h> #include <netinet/ip6.h> #include <netinet6/ip6_var.h> @@ -1553,21 +1554,26 @@ phyint_send(ip6, mifp, m) mifp - mif6table, error); #endif } else { -#ifdef MULTICAST_PMTUD - icmp6_error(mb_copy, ICMP6_PACKET_TOO_BIG, 0, linkmtu); -#else + /* + * pMTU discovery is intentionally disabled by default, since + * various router may notify pMTU in multicast, which can be + * a DDoS to a router + */ + if (ip6_mcast_pmtu) + icmp6_error(mb_copy, ICMP6_PACKET_TOO_BIG, 0, linkmtu); + else { #ifdef MRT6DEBUG - if (mrt6debug & DEBUG_XMIT) - log(LOG_DEBUG, - "phyint_send: packet too big on %s o %s g %s" - " size %d(discarded)\n", - if_name(ifp), - ip6_sprintf(&ip6->ip6_src), - ip6_sprintf(&ip6->ip6_dst), - mb_copy->m_pkthdr.len); + if (mrt6debug & DEBUG_XMIT) + log(LOG_DEBUG, + "phyint_send: packet too big on %s o %s " + "g %s size %d(discarded)\n", + if_name(ifp), + ip6_sprintf(&ip6->ip6_src), + ip6_sprintf(&ip6->ip6_dst), + mb_copy->m_pkthdr.len); #endif /* MRT6DEBUG */ - m_freem(mb_copy); /* simply discard the packet */ -#endif + m_freem(mb_copy); /* simply discard the packet */ + } } splx(s); |