mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-08 05:46:10 +02:00
fix rpc match
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
ce6abfa776
commit
d9a30240db
@ -48,12 +48,12 @@ class OFWireRpcSession(object):
|
||||
match = clses()
|
||||
for k, v in params.items():
|
||||
if hasattr(match, 'set_' + k):
|
||||
if k.startswith('ipv4_'):
|
||||
if k.startswith('ipv4_') or k.startswith('arp_spa') or k.startswith('arp_tpa'):
|
||||
if k.endswith('_masked'):
|
||||
addr = netaddr.IPNetwork(v).ip
|
||||
mask = netaddr.IPNetwork(v).netmask
|
||||
getattr(match, 'set_' + k)(int(addr), int(mask))
|
||||
return match
|
||||
continue
|
||||
else:
|
||||
v = int(netaddr.IPNetwork(v).ip)
|
||||
getattr(match, 'set_' + k)(v)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user