Skip to content

Commit

Permalink
fix kube-ovn-speaker (#3076)
Browse files Browse the repository at this point in the history
  • Loading branch information
KillMaster9 committed Jul 26, 2023
1 parent 827a5a2 commit 0fe9dcb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/speaker/subnet.go
Expand Up @@ -97,10 +97,7 @@ func (c *Controller) syncSubnetRoutes() {
}

klog.V(5).Infof("expected ipv4 routes %v,ipv6 route %v", bgpExpected[kubeovnv1.ProtocolIPv4], bgpExpected[kubeovnv1.ProtocolIPv6])
listPathRequest := &bgpapi.ListPathRequest{
TableType: bgpapi.TableType_GLOBAL,
Family: &bgpapi.Family{Afi: bgpapi.Family_AFI_IP, Safi: bgpapi.Family_SAFI_UNICAST},
}

fn := func(d *bgpapi.Destination) {
for _, path := range d.Paths {
attrInterfaces, _ := bgpapiutil.UnmarshalPathAttributes(path.Pattrs)
Expand All @@ -116,6 +113,10 @@ func (c *Controller) syncSubnetRoutes() {
}

if c.config.NeighborAddress != "" {
listPathRequest := &bgpapi.ListPathRequest{
TableType: bgpapi.TableType_GLOBAL,
Family: &bgpapi.Family{Afi: bgpapi.Family_AFI_IP, Safi: bgpapi.Family_SAFI_UNICAST},
}
if err := c.config.BgpServer.ListPath(context.Background(), listPathRequest, fn); err != nil {
klog.Errorf("failed to list exist route, %v", err)
return
Expand Down

0 comments on commit 0fe9dcb

Please sign in to comment.