Fix for ipv6 local-addr problem (#4876)

Co-authored-by: Pavel Shirshov <pavel.contrib@gmail.com>
This commit is contained in:
pavel-shirshov 2020-07-31 10:40:38 -07:00 committed by Abhishek Dosi
parent e3eddede1e
commit f757a5d6eb

View File

@ -542,6 +542,7 @@ class BGPPeerMgrBase(Manager):
else:
# The bgp session that belongs to a vnet cannot be advertised as the default BGP session.
# So we need to check whether this bgp session belongs to a vnet.
data["local_addr"] = str(netaddr.IPNetwork(str(data["local_addr"])).ip)
interface = self.get_local_interface(data["local_addr"])
if not interface:
print_data = nbr, data["local_addr"]