mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
benchmark: choose IPv4/IPv6 with cmd arguments
This commit is contained in:
1 parent
8d44e48c8b
commit
52cbf43e91
2 files changed
+2
-2
No files matched your search
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user