Date: Tue, 27 Apr 2010 14:14:21 +0000 (UTC) From: Bruce M Simpson <bms@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r207275 - head/sys/netinet Message-ID: <201004271414.o3REELE9031092@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bms Date: Tue Apr 27 14:14:21 2010 New Revision: 207275 URL: http://svn.freebsd.org/changeset/base/207275 Log: Fix a regression where DVMRP diagnostic traffic, such as that used by mrinfo and mtrace, was dropped by the IGMP TTL check. IGMP control traffic must always have a TTL of 1. Submitted by: Matthew Luckie MFC after: 3 days Modified: head/sys/netinet/igmp.c Modified: head/sys/netinet/igmp.c ============================================================================== --- head/sys/netinet/igmp.c Tue Apr 27 13:50:15 2010 (r207274) +++ head/sys/netinet/igmp.c Tue Apr 27 14:14:21 2010 (r207275) @@ -1468,12 +1468,6 @@ igmp_input(struct mbuf *m, int off) } ip = mtod(m, struct ip *); - if (ip->ip_ttl != 1) { - IGMPSTAT_INC(igps_rcv_badttl); - m_freem(m); - return; - } - /* * Validate checksum. */ @@ -1488,6 +1482,17 @@ igmp_input(struct mbuf *m, int off) m->m_data -= iphlen; m->m_len += iphlen; + /* + * IGMP control traffic is link-scope, and must have a TTL of 1. + * DVMRP traffic (e.g. mrinfo, mtrace) is an exception; + * probe packets may come from beyond the LAN. + */ + if (igmp->igmp_type != IGMP_DVMRP && ip->ip_ttl != 1) { + IGMPSTAT_INC(igps_rcv_badttl); + m_freem(m); + return; + } + switch (igmp->igmp_type) { case IGMP_HOST_MEMBERSHIP_QUERY: if (igmplen == IGMP_MINLEN) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004271414.o3REELE9031092>