From 6a23f19d0bc5a465767ed673940c09403a784c88 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Hugly Date: Thu, 21 Mar 2024 11:33:10 +0100 Subject: [PATCH] Reset the rp_filter value for "all" as well (on the container side). That setting is applied as an override. The effective value on a given interface is the max of the interface's value and the "all" value. Makes no sense, but that's the way it works. --- acceptance/router_benchmark/test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/acceptance/router_benchmark/test.py b/acceptance/router_benchmark/test.py index 55033832ef..45060c3f66 100644 --- a/acceptance/router_benchmark/test.py +++ b/acceptance/router_benchmark/test.py @@ -329,7 +329,6 @@ def create_interface(self, req: IntfReq, ns: str): "dev", hostIntf, "scope", "link") sudo("sysctl", "-qw", f"net.ipv6.conf.{hostIntf}.disable_ipv6=1") - sudo("sysctl", "-qw", f"net.ipv4.conf.{hostIntf}.rp_filter=0") sudo("ethtool", "-K", brIntf, "rx", "off", "tx", "off") sudo("ip", "link", "set", brIntf, "mtu", "8000") sudo("ip", "link", "set", brIntf, "address", mac) @@ -338,6 +337,8 @@ def create_interface(self, req: IntfReq, ns: str): sudo("ip", "link", "set", brIntf, "netns", ns) sudo("ip", "netns", "exec", ns, "sysctl", "-qw", f"net.ipv6.conf.{brIntf}.disable_ipv6=1") + sudo("ip", "netns", "exec", ns, + "sysctl", "-qw", f"net.ipv4.conf.all.rp_filter=0") sudo("ip", "netns", "exec", ns, "sysctl", "-qw", f"net.ipv4.conf.{brIntf}.rp_filter=0")