diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c index ed026a2fff..0d8214e4d6 100644 --- a/bgpd/bgp_nexthop.c +++ b/bgpd/bgp_nexthop.c @@ -563,7 +563,7 @@ bool bgp_nexthop_self(struct bgp *bgp, afi_t afi, uint8_t type, if (addr) return true; - if (new_afi == AF_INET) { + if (new_afi == AF_INET && hashcount(bgp->tip_hash)) { memset(&tmp_tip, 0, sizeof(struct tip_addr)); tmp_tip.addr = attr->nexthop;