Date: Tue, 21 Jan 2014 17:33:59 +0400 From: Gleb Smirnoff <glebius@FreeBSD.org> To: Olivier =?iso-8859-1?Q?Cochard-Labb=E9?= <olivier@cochard.me> Cc: "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>, "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>, Andre Oppermann <andre@freebsd.org> Subject: Re: Regression on 10-RC5 with a multicast routing daemon Message-ID: <20140121133359.GB66160@glebius.int.ru> In-Reply-To: <CA%2Bq%2BTcrCVmH9-9jNGbeTTjV9wUs=jrK2uFGvDRY0Du5oUVEGvQ@mail.gmail.com> References: <CA%2Bq%2BTcpFs_vff-r5e-Hw=F7QvGLc-9HGM-vm5TB1C4zik%2B0d8A@mail.gmail.com> <20140115113430.GK26504@FreeBSD.org> <CA%2Bq%2BTcrCVmH9-9jNGbeTTjV9wUs=jrK2uFGvDRY0Du5oUVEGvQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--yEPQxsgoJgBvi8ip Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Sun, Jan 19, 2014 at 02:42:32AM +0100, Olivier Cochard-Labbé wrote: O> > Olivier, O> > O> > O> > TL;DR version: you need not subtract iphdrlen in 10.0. Code in O> > igmp.c:accept_igmp() O> > should be smth like: O> > O> > iphdrlen = ip->ip_hl << 2; O> > #ifdef RAW_INPUT_IS_RAW /* Linux */ O> > ipdatalen = ntohs(ip->ip_len) - iphdrlen; O> > #else O> > #if __FreeBSD_version >= 1000000 O> > ipdatalen = ip->ip_len - iphdrlen; O> > #else O> > ipdatalen = ip->ip_len; O> > #endif O> > #endif O> > O> > O> With this patch I've no more the message "warning - Received packet from O> x.x.x.x shorter (28 bytes) than hdr+data length (20+28)":Thanks! O> But there is still a regression regarding the PIM socket behavior not O> related to the packet format. O> The pim.c include 2 functions (pim_read and pim_accept) that are called O> when the socket received a packet: There functions are never triggered when O> PIM packets are received on 10.0. O> In the same time igmp_read() and igmp_accept() are correctly triggered on O> 9.2 and 10.0. O> tcpdump in non-promiscious mode correctly see input of PIM packet: This O> should confirm that once this daemon is started, it correctly open a PIM O> socket and the multicast filter is updated. Can you please try this patch to kernel? If it doesn't work, can you please gather ktr(4) information with KTR_IPMF compiled into kernel. -- Totus tuus, Glebius. --yEPQxsgoJgBvi8ip Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="ip_mroute.c.diff" Index: sys/netinet/ip_mroute.c =================================================================== --- sys/netinet/ip_mroute.c (revision 260904) +++ sys/netinet/ip_mroute.c (working copy) @@ -2557,14 +2557,13 @@ pim_encapcheck(const struct mbuf *m, int off, int * is passed to if_simloop(). */ void -pim_input(struct mbuf *m, int off) +pim_input(struct mbuf *m, int iphlen) { struct ip *ip = mtod(m, struct ip *); struct pim *pim; int minlen; - int datalen = ntohs(ip->ip_len); + int datalen = ntohs(ip->ip_len) - iphlen; int ip_tos; - int iphlen = off; /* Keep statistics */ PIMSTAT_INC(pims_rcv_total_msgs); @@ -2594,8 +2593,7 @@ void * Get the IP and PIM headers in contiguous memory, and * possibly the PIM REGISTER header. */ - if ((m->m_flags & M_EXT || m->m_len < minlen) && - (m = m_pullup(m, minlen)) == 0) { + if (m->m_len < minlen && (m = m_pullup(m, minlen)) == 0) { CTR1(KTR_IPMF, "%s: m_pullup() failed", __func__); return; } --yEPQxsgoJgBvi8ip--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140121133359.GB66160>