capturing packet from wlan0 with netgraph?

Pyun YongHyeon pyunyh at gmail.com
Tue Jan 18 02:23:40 UTC 2011


On Tue, Jan 18, 2011 at 09:55:01AM +0800, Adrian Chadd wrote:
> On 18 January 2011 02:03, Monthadar Al Jaberi <monthadar at gmail.com> wrote:
> > filed a PR http://www.freebsd.org/cgi/query-pr.cgi?pr=154091
> 
> Thanks.
> 
> Network-stack and MIPS guys - what's the best way to handle this kind
> of stuff? This isn't the first time I've come across weird alignment
> stuff in the network stack that just doesn't seem to get much
> attention. Is it perhaps worth adding some debugging macros that
> account/log unaligned-ness? So people playing at home on i386/amd64
> can play along?
> 

I guess one of device driver/part of network stack is not aligning
IP header on strict-alignment architecture. But I'm pretty sure all
wired drivers always align IP header on 32bit boundary no matter
how it costs on strict alignment architectures. But it does not
align it on non-strict alignment architectures since that costs too
much without reasonable benefit.
I think you can add m_copyup() at the beginning ip_input to proceed
processing and print back traces to track down which one generated
unaligned IP header.

> 
> 
> Adrian


More information about the freebsd-net mailing list