libnetfilter_queue man page

Brad Fisher brad at
Wed Feb 8 19:18:38 CET 2006

Brad Fisher wrote:
> One small thing I should mention - possibly a bug:  I tried playing 
> around with nfq_get_packet_hw() yesterday and the hw_addrlen returned 
> seemed to be much too large...  For an ethernet packet I'd expect it 
> to be 6 (ethernet MAC address is 6 octets), but it was something like 
> 1520 or so.  Needless to say, much larger than expected.  Perhaps I'm 
> interpreting it wrong.  I haven't had a chance to look too deeply into 
> it yet.
I've determined that this is not a bug.  The hw address length is 
returned in network byte order, and thus the confusion.  The value of 
1536 I was seeing on an Athlon system is actually 6 in network order.  A 
simple ntohs() fixed it.  Sorry if this confused anyone...  Sure 
confused me for a bit :)


More information about the netfilter-devel mailing list