mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:04:41 +01:00
selftests: forwarding: fix pedit tests failure with br_netfilter enabled
The tests use the tc pedit action to modify the IPv4 source address
("pedit ex munge ip src set"), but the IP header checksum is not
recalculated after the modification. As a result, the modified packet
fails sanity checks in br_netfilter after bridging and is dropped,
which causes the test to fail.
Fix this by ensuring net.bridge.bridge-nf-call-iptables is set to 0
during the test execution. This prevents the bridge from passing
L2 traffic to netfilter, bypassing the checksum validation that
causes the test failure.
Fixes: 92ad382894 ("selftests: forwarding: Add a test for pedit munge SIP and DIP")
Fixes: 226657ba23 ("selftests: forwarding: Add a forwarding test for pedit munge dsfield")
Signed-off-by: Aleksei Oladko <aleksey.oladko@virtuozzo.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20260213131907.43351-4-aleksey.oladko@virtuozzo.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
ce9f6aec0f
commit
a8c198d16c
2 changed files with 16 additions and 0 deletions
|
|
@ -98,12 +98,20 @@ setup_prepare()
|
|||
h1_create
|
||||
h2_create
|
||||
switch_create
|
||||
|
||||
if [ -f /proc/sys/net/bridge/bridge-nf-call-iptables ]; then
|
||||
sysctl_set net.bridge.bridge-nf-call-iptables 0
|
||||
fi
|
||||
}
|
||||
|
||||
cleanup()
|
||||
{
|
||||
pre_cleanup
|
||||
|
||||
if [ -f /proc/sys/net/bridge/bridge-nf-call-iptables ]; then
|
||||
sysctl_restore net.bridge.bridge-nf-call-iptables
|
||||
fi
|
||||
|
||||
switch_destroy
|
||||
h2_destroy
|
||||
h1_destroy
|
||||
|
|
|
|||
|
|
@ -91,12 +91,20 @@ setup_prepare()
|
|||
h1_create
|
||||
h2_create
|
||||
switch_create
|
||||
|
||||
if [ -f /proc/sys/net/bridge/bridge-nf-call-iptables ]; then
|
||||
sysctl_set net.bridge.bridge-nf-call-iptables 0
|
||||
fi
|
||||
}
|
||||
|
||||
cleanup()
|
||||
{
|
||||
pre_cleanup
|
||||
|
||||
if [ -f /proc/sys/net/bridge/bridge-nf-call-iptables ]; then
|
||||
sysctl_restore net.bridge.bridge-nf-call-iptables
|
||||
fi
|
||||
|
||||
switch_destroy
|
||||
h2_destroy
|
||||
h1_destroy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue