Re: [libnftnl RFC] data_reg: Improve data reg value printing

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

 



Phil Sutter <phil@xxxxxx> wrote:
> The old code printing each field with data as u32 value is problematic
> in two ways:
> 
> A) Field values are printed in host byte order which may not be correct
>    and output for identical data will divert between machines of
>    different Endianness.
> 
> B) The actual data length is not clearly readable from given output.
> 
> This patch won't entirely fix for (A) given that data may be in host
> byte order but it solves for the common case of matching against packet
> data.

Can you provide an example diff and a diffstat for the expected fallout in
nftables?

> Fixing for (B) is crucial to see what's happening beneath the bonnet.
> The new output will show exactly what is used e.g. by a cmp expression.
> 
> Signed-off-by: Phil Sutter <phil@xxxxxx>
> ---
> This change will affect practically all stored payload dumps in nftables
> test suite. I have an alternative version which prints "full" reg fields
> as before and uses the byte-by-byte printing only for the remainder (if
> any). This would largely reduce the churn in stored payload dumps, but
> also make this less useful.

I think that if we want it then one big code-churn commit would be
better than multiple smaller ones.

The inability to see the width of the compare operation is bad
for debugging so I would prefer to change it.




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux