diff --git a/ryu/lib/packet/bgp.py b/ryu/lib/packet/bgp.py
index <HASH>..<HASH> 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):
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.