Skip to content

Commit

Permalink
disable ipv6 for vEthernet interface in virtual switch (sonic-net#650)
Browse files Browse the repository at this point in the history
Signed-off-by: Guohan Lu <[email protected]>
  • Loading branch information
lguohan authored Oct 21, 2018
1 parent 7c90bb3 commit e8e3ddc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e8e3ddc

Please sign in to comment.