Tests: update addr to use a real network address

This commit is contained in:
Pierre Lalet 2021-12-09 15:01:20 +01:00
parent db75ffb9c5
commit 1619261ebf
2 changed files with 4 additions and 5 deletions

View file

@ -55,10 +55,9 @@ tap = TunTapInterface(IFACE)
conf.iface = resolve_iface(IFACE)
# set interface
subprocess.check_call(["ip", "addr", "add", "dev", IFACE, "192.0.0.2"])
subprocess.check_call(["ip", "addr", "add", "dev", IFACE, "192.0.0.0/31"])
subprocess.check_call(["ip", "link", "set", IFACE, "up"])
subprocess.check_call(["ip", "route", "add", "192.0.0.1/32", "dev", IFACE])
subprocess.check_call(["ip", "route", "add", "1.2.3.4/32", "dev", IFACE])
subprocess.check_call(["ip", "route", "add", "1.2.3.4/32", "via", IPV4_ADDR])
conf.route.resync()
# start capture