benchmark: choose IPv4/IPv6 with cmd arguments

This commit is contained in:
Adrien Béraud committed 2015-07-23 18:03:01 -04:00
1 parent 8d44e48c8b
commit 52cbf43e91
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -124,7 +124,7 @@ if __name__ == '__main__':
if args.bootstrap6:
bs.append((args.bootstrap6, str(4000)))
net = DhtNetwork(iface=args.iface, port=args.port, bootstrap=bs if args.bootstrap else [])
net = DhtNetwork(iface=args.iface, port=args.port, bootstrap=bs)
net.resize(args.node_num)
with lock:
+1 -1
View File
@@ -57,7 +57,7 @@ try:
if args.ipv4:
i.add_ip(local_addr4+'1/24')
if args.ipv6:
i.add_ip(local_addr6+'1/24')
i.add_ip(local_addr6+'1/64')
i.up()
with ip.interfaces['tap'+args.ifname] as tap: