diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 171b5c7add..f04d6db53b 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -803,6 +803,12 @@ bgp_info_cmp (struct bgp *bgp, struct bgp_info *new, struct bgp_info *exist, return 0; } + /* locally configured routes to advertise do not have su_remote */ + if (new->peer->su_remote == NULL) + return 0; + if (exist->peer->su_remote == NULL) + return 1; + ret = sockunion_cmp (new->peer->su_remote, exist->peer->su_remote); if (ret == 1)