Small patch to multicast code...

Luigi Rizzo rizzo at iet.unipi.it
Fri Aug 22 19:39:25 UTC 2008


On Fri, Aug 22, 2008 at 07:43:03PM +0100, Bruce M. Simpson wrote:
> gnn at FreeBSD.org wrote:
> >I gather you mean that a fast link on which also we're looping back
> >the packet will be an issue?  Since this packet is only going into the
> >simloop() routine.
> >  
> 
> We end up calling if_simloop() from a few "interesting" places, in 
> particular the kernel PIM packet handler.
> 
> In this particular case we're going to take a full mbuf chain copy every 
> time we send a packet which needs to be looped back to userland.
...
> In the case of ip_mloopback(), somehow we are stomping on a read-only 
> copy of an mbuf chain. The use of m_copy() with m_pullup() there is fine 
> according to the documented uses of mbuf(9), although as Luigi pointed 
> out, most likely we need to look at the upper-layer protocol too, e.g. 
> where UDP checksums are also being offloaded.

in fact, george, if you have an easy way to reproduce the error,
could you see if reverting your change and instead adding
sizeof(struct udphdr) to the length argument in the call to m_pullup()
fixes the problem ?

	cheers
	luigi


More information about the freebsd-net mailing list