summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ryu/lib/packet/bgp.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ryu/lib/packet/bgp.py b/ryu/lib/packet/bgp.py
index d22bb0ed..794e0456 100644
--- a/ryu/lib/packet/bgp.py
+++ b/ryu/lib/packet/bgp.py
@@ -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):