const char *asn;
const char *addr;
char *argstr;
+ int ret;
/* Add configuration. */
rhc = nb_running_get_entry(args->dnode, NULL, true);
rhc->rhc_rule = "aggregator as";
rhc->rhc_event = RMAP_EVENT_SET_DELETED;
- generic_set_add(rhc->rhc_rmi, rhc->rhc_rule, argstr,
- args->errmsg, args->errmsg_len);
+ ret = generic_set_add(rhc->rhc_rmi, rhc->rhc_rule, argstr, 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);
+
XFREE(MTYPE_ROUTE_MAP_COMPILED, argstr);
}
/*
enum ecommunity_lb_type lb_type;
char str[VTY_BUFSIZ];
uint16_t bandwidth;
+ int ret;
/* Add configuration. */
rhc = nb_running_get_entry(args->dnode, NULL, true);
if (yang_dnode_get_bool(args->dnode, "./two-octet-as-specific"))
strlcat(str, " non-transitive", sizeof(str));
- generic_set_add(rhc->rhc_rmi,
- "extcommunity bandwidth", str,
- args->errmsg, args->errmsg_len);
+ ret = generic_set_add(rhc->rhc_rmi, "extcommunity bandwidth", str,
+ 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);
}
/*