Re: [PATCH iptables] arptables-nft: fix decoding of hlen on bigendian platforms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 22, 2019 at 01:26:05PM +0100, Florian Westphal wrote:
> The existing test fail with:
> extensions/libarpt_standard.t: ERROR: line 2 (cannot find: arptables -I INPUT -s 192.168.0.1)
> 
> ... because hlen is 0 instead of expected "6".
> The rule is correct, i.e. this is a decode/display bug: arp_hlen is
> specified as 'unsigned short' instead of uint8_t.
> 
> On LSB systems, this doesn't matter but on MSB the value then is '0x600'
> instead of '0x006' which becomes 0 when assignment to the u8 header field.
> 
> Signed-off-by: Florian Westphal <fw@xxxxxxxxx>

Indeed surprisingly easy!

Acked-by: Phil Sutter <phil@xxxxxx>

Thanks a lot for taking care of this one,

Phil



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux