Skip to content

Commit

Permalink
Ryu 4.9's BGP speaker library, doesn't handle an ipaddr.IPAddress as …
Browse files Browse the repository at this point in the history
…a nexthop.
  • Loading branch information
Josh Bailey committed Dec 22, 2016
1 parent 8956cde commit 8c62149
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ryu_faucet/org/onfsdn/faucet/faucet.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,17 @@ def _create_bgp_speaker_for_vlan(self, vlan):
prefix = ipaddr.IPNetwork(
'/'.join((str(controller_ip.ip), str(controller_ip.prefixlen))))
bgp_speaker.prefix_add(
prefix=str(prefix), next_hop=controller_ip.ip)
prefix=str(prefix), next_hop=str(controller_ip.ip))
for route_table in (vlan.ipv4_routes, vlan.ipv6_routes):
for ip_dst, ip_gw in route_table.iteritems():
bgp_speaker.prefix_add(
prefix=str(ip_dst), next_hop=str(ip_gw))
for bgp_neighbor_address in vlan.bgp_neighbor_addresses:
bgp_speaker.neighbor_add(
address=bgp_neighbor_address,
remote_as=vlan.bgp_neighbor_as)
remote_as=vlan.bgp_neighbor_as,
enable_ipv4=True,
enable_ipv6=True)
return bgp_speaker

def _reset_bgp(self):
Expand Down

0 comments on commit 8c62149

Please sign in to comment.