mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-30 04:33:00 +02:00
52 lines
1.7 KiB
Python
Executable File
52 lines
1.7 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
"""
|
|
Interface IPv6 autoconf for bridges
|
|
|
|
Verify IPv6 autoconf on a bridge is properly set up for global prefix.
|
|
See issue #473 for details.
|
|
"""
|
|
import infamy
|
|
from infamy.util import until
|
|
|
|
with infamy.Test() as test:
|
|
with test.step("Set up topology and attach to target DUT"):
|
|
env = infamy.Env()
|
|
target = env.attach("target", "mgmt")
|
|
tgtssh = env.attach("target", "mgmt", "ssh")
|
|
|
|
with test.step("Setting up bridge with IPv6 SLAAC for global prefix on target:data"):
|
|
_, tport = env.ltop.xlate("target", "data")
|
|
|
|
target.put_config_dicts({"ietf-interfaces": {
|
|
"interfaces": {
|
|
"interface": [
|
|
{
|
|
"name": "br0",
|
|
"type": "infix-if-type:bridge",
|
|
"enabled": True,
|
|
"ipv6": {
|
|
"enabled": True,
|
|
"autoconf": {
|
|
"create-global-addresses": True
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": tport,
|
|
"enabled": True,
|
|
"infix-interfaces:bridge-port": {
|
|
"bridge": "br0"
|
|
}
|
|
},
|
|
]
|
|
}
|
|
}})
|
|
|
|
with test.step("Verify using sysctl that 'net.ipv6.conf.br0.autoconf' is 1 on target"):
|
|
def check_autoconf():
|
|
out = tgtssh.runsh("sysctl net.ipv6.conf.br0.autoconf").stdout
|
|
return "autoconf = 1" in out
|
|
until(check_autoconf, attempts=10)
|
|
|
|
test.succeed()
|