Skip to content

Commit e8e3ddc

Browse files
authored
disable ipv6 for vEthernet interface in virtual switch (sonic-net#650)
Signed-off-by: Guohan Lu <[email protected]>
1 parent 7c90bb3 commit e8e3ddc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/conftest.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ def __init__(self, ctn_name, pid, i):
108108

109109
# disable arp, so no neigh on vEthernet(s)
110110
ensure_system("nsenter -t %d -n ip link set arp off dev %s" % (pid, self.vifname))
111+
ensure_system("nsenter -t %d -n sysctl -w net.ipv6.conf.%s.disable_ipv6=1" % (pid, self.vifname))
111112

112113
def __del__(self):
113114
if self.cleanup:
@@ -189,7 +190,10 @@ def __init__(self, name=None):
189190

190191
self.appldb = None
191192
try:
192-
self.ctn.exec_run("sysctl -w net.ipv6.conf.all.disable_ipv6=0")
193+
# temp fix: remove them once they are moved to vs start.sh
194+
self.ctn.exec_run("sysctl -w net.ipv6.conf.default.disable_ipv6=0")
195+
for i in range(0, 128, 4):
196+
self.ctn.exec_run("sysctl -w net.ipv6.conf.vEthernet%d.disable_ipv6=1" % i)
193197
self.check_ready()
194198
self.init_asicdb_validator()
195199
self.appldb = ApplDbValidator(self)

0 commit comments

Comments
 (0)