mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-29 13:51:53 +00:00
Merge pull request #9756 from donaldsharp/unchecked
This commit is contained in:
commit
b105e0bc2b
@ -1035,6 +1035,7 @@ lib_route_map_entry_match_condition_rmap_match_condition_comm_list_finish(
|
|||||||
char *argstr;
|
char *argstr;
|
||||||
const char *condition;
|
const char *condition;
|
||||||
route_map_event_t event;
|
route_map_event_t event;
|
||||||
|
int ret;
|
||||||
|
|
||||||
/* Add configuration. */
|
/* Add configuration. */
|
||||||
rhc = nb_running_get_entry(args->dnode, NULL, true);
|
rhc = nb_running_get_entry(args->dnode, NULL, true);
|
||||||
@ -1072,8 +1073,14 @@ lib_route_map_entry_match_condition_rmap_match_condition_comm_list_finish(
|
|||||||
rhc->rhc_event = RMAP_EVENT_ECLIST_DELETED;
|
rhc->rhc_event = RMAP_EVENT_ECLIST_DELETED;
|
||||||
}
|
}
|
||||||
|
|
||||||
bgp_route_match_add(rhc->rhc_rmi, rhc->rhc_rule, argstr, event,
|
ret = bgp_route_match_add(rhc->rhc_rmi, rhc->rhc_rule, argstr, event,
|
||||||
args->errmsg, args->errmsg_len);
|
args->errmsg, args->errmsg_len);
|
||||||
|
/*
|
||||||
|
* At this point if this is not a successful operation
|
||||||
|
* bgpd is about to crash. Let's just cut to the
|
||||||
|
* chase and do it.
|
||||||
|
*/
|
||||||
|
assert(ret == RMAP_COMPILE_SUCCESS);
|
||||||
|
|
||||||
if (argstr != value)
|
if (argstr != value)
|
||||||
XFREE(MTYPE_ROUTE_MAP_COMPILED, argstr);
|
XFREE(MTYPE_ROUTE_MAP_COMPILED, argstr);
|
||||||
@ -2440,6 +2447,7 @@ void lib_route_map_entry_set_action_rmap_set_action_aggregator_finish(
|
|||||||
const char *asn;
|
const char *asn;
|
||||||
const char *addr;
|
const char *addr;
|
||||||
char *argstr;
|
char *argstr;
|
||||||
|
int ret;
|
||||||
|
|
||||||
/* Add configuration. */
|
/* Add configuration. */
|
||||||
rhc = nb_running_get_entry(args->dnode, NULL, true);
|
rhc = nb_running_get_entry(args->dnode, NULL, true);
|
||||||
@ -2456,8 +2464,15 @@ void lib_route_map_entry_set_action_rmap_set_action_aggregator_finish(
|
|||||||
rhc->rhc_rule = "aggregator as";
|
rhc->rhc_rule = "aggregator as";
|
||||||
rhc->rhc_event = RMAP_EVENT_SET_DELETED;
|
rhc->rhc_event = RMAP_EVENT_SET_DELETED;
|
||||||
|
|
||||||
generic_set_add(rhc->rhc_rmi, rhc->rhc_rule, argstr,
|
ret = generic_set_add(rhc->rhc_rmi, rhc->rhc_rule, argstr, args->errmsg,
|
||||||
args->errmsg, args->errmsg_len);
|
args->errmsg_len);
|
||||||
|
/*
|
||||||
|
* At this point if this is not a successful operation
|
||||||
|
* bgpd is about to crash. Let's just cut to the
|
||||||
|
* chase and do it.
|
||||||
|
*/
|
||||||
|
assert(ret == CMD_SUCCESS);
|
||||||
|
|
||||||
XFREE(MTYPE_ROUTE_MAP_COMPILED, argstr);
|
XFREE(MTYPE_ROUTE_MAP_COMPILED, argstr);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@ -2604,6 +2619,7 @@ lib_route_map_entry_set_action_rmap_set_action_extcommunity_lb_finish(
|
|||||||
enum ecommunity_lb_type lb_type;
|
enum ecommunity_lb_type lb_type;
|
||||||
char str[VTY_BUFSIZ];
|
char str[VTY_BUFSIZ];
|
||||||
uint16_t bandwidth;
|
uint16_t bandwidth;
|
||||||
|
int ret;
|
||||||
|
|
||||||
/* Add configuration. */
|
/* Add configuration. */
|
||||||
rhc = nb_running_get_entry(args->dnode, NULL, true);
|
rhc = nb_running_get_entry(args->dnode, NULL, true);
|
||||||
@ -2629,9 +2645,14 @@ lib_route_map_entry_set_action_rmap_set_action_extcommunity_lb_finish(
|
|||||||
if (yang_dnode_get_bool(args->dnode, "./two-octet-as-specific"))
|
if (yang_dnode_get_bool(args->dnode, "./two-octet-as-specific"))
|
||||||
strlcat(str, " non-transitive", sizeof(str));
|
strlcat(str, " non-transitive", sizeof(str));
|
||||||
|
|
||||||
generic_set_add(rhc->rhc_rmi,
|
ret = generic_set_add(rhc->rhc_rmi, "extcommunity bandwidth", str,
|
||||||
"extcommunity bandwidth", str,
|
args->errmsg, args->errmsg_len);
|
||||||
args->errmsg, args->errmsg_len);
|
/*
|
||||||
|
* At this point if this is not a successful operation
|
||||||
|
* bgpd is about to crash. Let's just cut to the
|
||||||
|
* chase and do it.
|
||||||
|
*/
|
||||||
|
assert(ret == CMD_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user