Skip to content

Commit

Permalink
bgpd: add config default for "route-reflector allow-outbound-policy"
Browse files Browse the repository at this point in the history
Just to make it simpler for compiling with a different default value.
No change to its default value.

Signed-off-by: Enke Chen <[email protected]>
  • Loading branch information
enkechen-panw committed Feb 1, 2025
1 parent ce20b8c commit a2018b3
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions bgpd/bgp_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ FRR_CFG_DEFAULT_BOOL(BGP_ENFORCE_FIRST_AS,
{ .val_bool = false, .match_version = "< 9.1", },
{ .val_bool = true },
);
FRR_CFG_DEFAULT_BOOL(BGP_RR_ALLOW_OUTBOUND_POLICY,
{ .val_bool = false },
);

DEFINE_HOOK(bgp_inst_config_write,
(struct bgp *bgp, struct vty *vty),
Expand Down Expand Up @@ -622,6 +625,8 @@ int bgp_get_vty(struct bgp **bgp, as_t *as, const char *name,
BGP_FLAG_DYNAMIC_CAPABILITY);
if (DFLT_BGP_ENFORCE_FIRST_AS)
SET_FLAG((*bgp)->flags, BGP_FLAG_ENFORCE_FIRST_AS);
if (DFLT_BGP_RR_ALLOW_OUTBOUND_POLICY)
SET_FLAG((*bgp)->flags, BGP_FLAG_RR_ALLOW_OUTBOUND_POLICY);

ret = BGP_SUCCESS;
}
Expand Down Expand Up @@ -19780,10 +19785,12 @@ int bgp_config_write(struct vty *vty)
}
}

if (CHECK_FLAG(bgp->flags, BGP_FLAG_RR_ALLOW_OUTBOUND_POLICY)) {
vty_out(vty,
" bgp route-reflector allow-outbound-policy\n");
}
if (!!CHECK_FLAG(bgp->flags, BGP_FLAG_RR_ALLOW_OUTBOUND_POLICY) !=
SAVE_BGP_RR_ALLOW_OUTBOUND_POLICY)
vty_out(vty, " %sbgp route-reflector allow-outbound-policy\n",
CHECK_FLAG(bgp->flags, BGP_FLAG_RR_ALLOW_OUTBOUND_POLICY) ? ""
: "no ");

if (CHECK_FLAG(bgp->flags, BGP_FLAG_COMPARE_ROUTER_ID))
vty_out(vty, " bgp bestpath compare-routerid\n");
if (CHECK_FLAG(bgp->flags, BGP_FLAG_COMPARE_AIGP))
Expand Down

0 comments on commit a2018b3

Please sign in to comment.