Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Oct 1999 09:46:50 -0400
From:      John LoVerso <jloverso@infolibria.com>
To:        jgarman@wedgie.org
Cc:        stable@FreeBSD.ORG
Subject:   Re: weird message "m_len 46, need more?"
Message-ID:  <380C764A.7E20B88B@infolibria.com>
References:  <19991019014901.A63271@got.wedgie.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> I get these strange messages in my dmesg (they come in bunches):
> -- m_len 46, need more...

A quick 'grep "need more" /usr/src/sys/netinet/*' turned up the code in ip_fw.c:

                if ((*m)->m_len < 14 + hlen + 14) {
                    printf("-- m_len %d, need more...\n", (*m)->m_len);
                    goto non_ip ;
                }

This code is looking at IP datagrams that are (apparently) being bridged.  m is
the head of the mbuf chain holding a "complete" IP datagram.  It's checking the
length of the first mbuf against (14 + hlen + 14), which is:

	14 bytes of Ethernet header,
	the IP header length,
	and 14 bytes of the protocol data.

I assume the second 14 is there because that gives enough a TCP header to check
the flags byte.

This code is slightly wrong for several reasons.  At the time of this check, it
isn't known that the datagram is for TCP.  When later code checks for
IPPROTO_TCP, it will do an m_pullup() to make sure at least 14 bytes of the TCP
header are in the first mbuf.  That's because it is (theoretically) possible for
the rest of this header to be in the second mbuf of the chain.  Hence, the check
above should be using the pkthdr->len field of the mbuf chain, rather than the
m_len of the first mbuf.  It should also not check for the extra 14 bytes of
protocol header out of this calculation, instead leaving it to the code
specifically for IPPROTO_TCP (or IPPROTO_UDP).


You'll probably get this message whenever your system gets a UDP or other
non-TCP IP datagram (ICMP?  Any other user protocol running on top of raw IP
sockets) that is less than 14 bytes long.  And I suspect you might need to have
bridging and ip_fw turned on to get the messages, too.

However, other than junk messages in your dmesg, this mostly doesn't hurt
anything.

John


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?380C764A.7E20B88B>