diff options
| author | Phil Sutter <phil@nwl.cc> | 2025-09-09 22:27:19 +0200 |
|---|---|---|
| committer | Phil Sutter <phil@nwl.cc> | 2025-09-11 18:16:23 +0200 |
| commit | 98e51e687616a4b54efa3b723917c292e3acc380 (patch) | |
| tree | 61f38a8d6604205e1d037cf2961e21727860b6d6 /include/linux/netfilter | |
| parent | df19bf51d49bee8d1473c365885d06ee5ff6287f (diff) | |
fib: Fix for existence check on Big Endian
Adjust the expression size to 1B so cmp expression value is correct.
Without this, the rule 'fib saddr . iif check exists' generates
following byte code on BE:
| [ fib saddr . iif oif present => reg 1 ]
| [ cmp eq reg 1 0x00000001 ]
Though with NFTA_FIB_F_PRESENT flag set, nft_fib.ko writes to the first
byte of reg 1 only (using nft_reg_store8()). With this patch in place,
byte code is correct:
| [ fib saddr . iif oif present => reg 1 ]
| [ cmp eq reg 1 0x01000000 ]
Fixes: f686a17eafa0b ("fib: Support existence check")
Cc: Yi Chen <yiche@redhat.com>
Signed-off-by: Phil Sutter <phil@nwl.cc>
Reviewed-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/linux/netfilter')
0 files changed, 0 insertions, 0 deletions
