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.
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; }
_______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"