mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-08 22:06:10 +02:00
packet/bgp: Add the address converter for Flow Specification
Argument "addr" of "_FlowSpecPrefixBase" must be specified in the network address. If argument "addr" specified in the host address, this patch converts the given address into the network address. Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
66a5bddaf0
commit
271961ecb1
@ -2332,7 +2332,8 @@ class _FlowSpecPrefixBase(_FlowSpecComponentBase, IPAddrPrefix):
|
||||
def __init__(self, length, addr, type_=None):
|
||||
super(_FlowSpecPrefixBase, self).__init__(type_)
|
||||
self.length = length
|
||||
self.addr = addr
|
||||
prefix = "%s/%s" % (addr, length)
|
||||
self.addr = str(netaddr.ip.IPNetwork(prefix).network)
|
||||
|
||||
@classmethod
|
||||
def parse_body(cls, buf):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user