From e8e3ddcf4306f6266e10b5805cc3921af79ae7c3 Mon Sep 17 00:00:00 2001 From: lguohan Date: Sun, 21 Oct 2018 11:03:08 -0700 Subject: [PATCH] disable ipv6 for vEthernet interface in virtual switch (#650) Signed-off-by: Guohan Lu --- tests/conftest.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index bcca25673bba..6f3dd9276fab 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -108,6 +108,7 @@ def __init__(self, ctn_name, pid, i): # disable arp, so no neigh on vEthernet(s) ensure_system("nsenter -t %d -n ip link set arp off dev %s" % (pid, self.vifname)) + ensure_system("nsenter -t %d -n sysctl -w net.ipv6.conf.%s.disable_ipv6=1" % (pid, self.vifname)) def __del__(self): if self.cleanup: @@ -189,7 +190,10 @@ def __init__(self, name=None): self.appldb = None try: - self.ctn.exec_run("sysctl -w net.ipv6.conf.all.disable_ipv6=0") + # temp fix: remove them once they are moved to vs start.sh + self.ctn.exec_run("sysctl -w net.ipv6.conf.default.disable_ipv6=0") + for i in range(0, 128, 4): + self.ctn.exec_run("sysctl -w net.ipv6.conf.vEthernet%d.disable_ipv6=1" % i) self.check_ready() self.init_asicdb_validator() self.appldb = ApplDbValidator(self)