bgp: ignore NHT when bgpd has never connected zebra
diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c
index 50f14ce..0cfcadd 100644
--- a/bgpd/bgp_nht.c
+++ b/bgpd/bgp_nht.c
@@ -62,7 +62,8 @@
   if (connected && !(CHECK_FLAG(bnc->flags, BGP_NEXTHOP_CONNECTED)))
     return 0;
 
-  return (CHECK_FLAG(bnc->flags, BGP_NEXTHOP_VALID));
+  return (bgp_zebra_num_connects() == 0 ||
+          CHECK_FLAG(bnc->flags, BGP_NEXTHOP_VALID));
 }
 
 static void