mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-25 20:08:40 +00:00
bgpd: fix VRF leaking with 'network import-check' (2/4)
"if not XX else" statements are confusing. Replace two "if not XX else" statements by "if XX else" to prepare next commits. The patch is only cosmetic. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
This commit is contained in:
parent
6de0cd9bdf
commit
bb71bc02fd
@ -918,24 +918,22 @@ void bgp_nexthop_update(struct vrf *vrf, struct prefix *match,
|
||||
tree = &bgp->nexthop_cache_table[afi];
|
||||
|
||||
bnc_nhc = bnc_find(tree, match, nhr->srte_color, 0);
|
||||
if (!bnc_nhc) {
|
||||
if (BGP_DEBUG(nht, NHT))
|
||||
zlog_debug("parse nexthop update %pFX(%u)(%s): bnc info not found for nexthop cache",
|
||||
&nhr->prefix, nhr->srte_color,
|
||||
bgp->name_pretty);
|
||||
} else
|
||||
if (bnc_nhc)
|
||||
bgp_process_nexthop_update(bnc_nhc, nhr, false);
|
||||
else if (BGP_DEBUG(nht, NHT))
|
||||
zlog_debug("parse nexthop update %pFX(%u)(%s): bnc info not found for nexthop cache",
|
||||
&nhr->prefix, nhr->srte_color,
|
||||
bgp->name_pretty);
|
||||
|
||||
tree = &bgp->import_check_table[afi];
|
||||
|
||||
bnc_import = bnc_find(tree, match, nhr->srte_color, 0);
|
||||
if (!bnc_import) {
|
||||
if (BGP_DEBUG(nht, NHT))
|
||||
zlog_debug("parse nexthop update %pFX(%u)(%s): bnc info not found for import check",
|
||||
&nhr->prefix, nhr->srte_color,
|
||||
bgp->name_pretty);
|
||||
} else
|
||||
if (bnc_import)
|
||||
bgp_process_nexthop_update(bnc_import, nhr, true);
|
||||
else if (BGP_DEBUG(nht, NHT))
|
||||
zlog_debug("parse nexthop update %pFX(%u)(%s): bnc info not found for import check",
|
||||
&nhr->prefix, nhr->srte_color,
|
||||
bgp->name_pretty);
|
||||
|
||||
/*
|
||||
* HACK: if any BGP route is dependant on an SR-policy that doesn't
|
||||
|
Loading…
Reference in New Issue
Block a user