mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-12 09:52:27 +00:00
bgpd: simplify lookup list call with fs pbr entries
no test is done to check for validity of fs_pbr and fs_iprule pointer. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
parent
2fe55afeec
commit
e0c7edb0cb
@ -2067,9 +2067,9 @@ static void bgp_pbr_policyroute_add_to_zebra_unit(struct bgp *bgp,
|
|||||||
struct bgp_path_info_extra *extra =
|
struct bgp_path_info_extra *extra =
|
||||||
bgp_path_info_extra_get(path);
|
bgp_path_info_extra_get(path);
|
||||||
|
|
||||||
if (extra && extra->bgp_fs_iprule &&
|
if (extra &&
|
||||||
listnode_lookup(extra->bgp_fs_iprule,
|
listnode_lookup_nocheck(extra->bgp_fs_iprule,
|
||||||
bpr)) {
|
bpr)) {
|
||||||
if (BGP_DEBUG(pbr, PBR_ERROR))
|
if (BGP_DEBUG(pbr, PBR_ERROR))
|
||||||
zlog_err("%s: entry %p/%p already "
|
zlog_err("%s: entry %p/%p already "
|
||||||
"installed in bgp pbr iprule",
|
"installed in bgp pbr iprule",
|
||||||
@ -2216,8 +2216,8 @@ static void bgp_pbr_policyroute_add_to_zebra_unit(struct bgp *bgp,
|
|||||||
struct bgp_path_info_extra *extra =
|
struct bgp_path_info_extra *extra =
|
||||||
bgp_path_info_extra_get(path);
|
bgp_path_info_extra_get(path);
|
||||||
|
|
||||||
if (extra && extra->bgp_fs_pbr &&
|
if (extra &&
|
||||||
listnode_lookup(extra->bgp_fs_pbr, bpme)) {
|
listnode_lookup_nocheck(extra->bgp_fs_pbr, bpme)) {
|
||||||
if (BGP_DEBUG(pbr, PBR_ERROR))
|
if (BGP_DEBUG(pbr, PBR_ERROR))
|
||||||
zlog_err(
|
zlog_err(
|
||||||
"%s: entry %p/%p already installed in bgp pbr",
|
"%s: entry %p/%p already installed in bgp pbr",
|
||||||
|
Loading…
Reference in New Issue
Block a user