return 0;
/* Don't try to register if Zebra doesn't know of this instance. */
- if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bgp))
+ if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bgp)) {
+ if (BGP_DEBUG(zebra, ZEBRA))
+ zlog_debug("%s: No zebra instance to talk to, not installing remote macip",
+ __PRETTY_FUNCTION__);
return 0;
-
+ }
s = zclient->obuf;
stream_reset(s);
return 0;
/* Don't try to register if Zebra doesn't know of this instance. */
- if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bgp))
+ if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bgp)) {
+ if (BGP_DEBUG(zebra, ZEBRA))
+ zlog_debug("%s: No zebra instance to talk to, not installing remote vtep",
+ __PRETTY_FUNCTION__);
return 0;
+ }
s = zclient->obuf;
stream_reset(s);
return;
/* Don't try to register if Zebra doesn't know of this instance. */
- if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bnc->bgp))
+ if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bnc->bgp)) {
+ if (BGP_DEBUG(zebra, ZEBRA))
+ zlog_debug("%s: No zebra instance to talk to, not installing NHT entry",
+ __PRETTY_FUNCTION__);
return;
+ }
p = &(bnc->node->p);
if ((command == ZEBRA_NEXTHOP_REGISTER
if (zclient->sock <= 0)
return 0;
- if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bgp))
+ if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bgp)) {
+ zlog_debug("%s: No zebra instance to talk to, not installing information",
+ __PRETTY_FUNCTION__);
return 0;
+ }
return 1;
}
return 0;
/* Don't try to register if Zebra doesn't know of this instance. */
- if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bgp))
+ if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bgp)) {
+ if (BGP_DEBUG(zebra, ZEBRA))
+ zlog_debug("%s: No zebra instance to talk to, cannot advertise subnet",
+ __PRETTY_FUNCTION__);
return 0;
+ }
s = zclient->obuf;
stream_reset(s);
return 0;
/* Don't try to register if Zebra doesn't know of this instance. */
- if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bgp))
+ if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bgp)) {
+ if (BGP_DEBUG(zebra, ZEBRA))
+ zlog_debug("%s: No zebra instance to talk to, not installing gw_macip",
+ __PRETTY_FUNCTION__);
return 0;
+ }
s = zclient->obuf;
stream_reset(s);
return 0;
/* Don't try to register if Zebra doesn't know of this instance. */
- if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bgp))
+ if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bgp)) {
+ if (BGP_DEBUG(zebra, ZEBRA))
+ zlog_debug("%s: No zebra instance to talk to, not installing all vni",
+ __PRETTY_FUNCTION__);
return 0;
+ }
s = zclient->obuf;
stream_reset(s);
bgp_handle_socket(bgp, vrf, VRF_UNKNOWN, true);
listnode_add(bm->bgp, bgp);
- if (IS_BGP_INST_KNOWN_TO_ZEBRA(bgp))
+ if (IS_BGP_INST_KNOWN_TO_ZEBRA(bgp)) {
+ if (BGP_DEBUG(zebra, ZEBRA))
+ zlog_debug("%s: Registering BGP instance %s to zebra",
+ __PRETTY_FUNCTION__, name);
bgp_zebra_instance_register(bgp);
-
+ }
return 0;
}
}
/* Deregister from Zebra, if needed */
- if (IS_BGP_INST_KNOWN_TO_ZEBRA(bgp))
+ if (IS_BGP_INST_KNOWN_TO_ZEBRA(bgp)) {
+ if (BGP_DEBUG(zebra, ZEBRA))
+ zlog_debug("%s: deregistering this bgp %s instance from zebra",
+ __PRETTY_FUNCTION__, bgp->name);
bgp_zebra_instance_deregister(bgp);
+ }
/* Remove visibility via the master list - there may however still be
* routes to be processed still referencing the struct bgp.