encaptlv = XCALLOC(MTYPE_ENCAP_TLV,
sizeof(struct bgp_attr_encap_subtlv) + 4);
- assert(encaptlv);
encaptlv->type =
BGP_VNC_SUBTLV_TYPE_LIFETIME; /* prefix lifetime */
encaptlv->length = 4;
MTYPE_ENCAP_TLV,
sizeof(struct bgp_attr_encap_subtlv) + 2
+ hop->length);
- assert(encaptlv);
encaptlv->type =
BGP_VNC_SUBTLV_TYPE_RFPOPTION; /* RFP
option
SET_FLAG(new->flags, BGP_PATH_VALID);
/* save backref to rfapi handle */
- assert(bgp_path_info_extra_get(new));
+ bgp_path_info_extra_get(new);
new->extra->vnc.export.rfapi_handle = (void *)rfd;
encode_label(label_val, &new->extra->label[0]);
rfd = XCALLOC(MTYPE_RFAPI_DESC,
sizeof(struct rfapi_descriptor));
}
- assert(rfd);
rfd->bgp = bgp;
if (default_options) {
if (rc) {
/* Not found */
adb = XCALLOC(MTYPE_RFAPI_ADB, sizeof(struct rfapi_adb));
- assert(adb);
adb->lifetime = lifetime;
adb->u.key = rk;
stlv = attr->encap_subtlvs;
uo = XCALLOC(MTYPE_RFAPI_UN_OPTION, sizeof(struct rfapi_un_option));
- assert(uo);
uo->type = RFAPI_UN_OPTION_TYPE_TUNNELTYPE;
uo->v.tunnel.type = attr->encap_tunneltype;
tto = &uo->v.tunnel;
#endif
new = XCALLOC(MTYPE_RFAPI_NEXTHOP, sizeof(struct rfapi_next_hop_entry));
- assert(new);
new->prefix = *rprefix;
vo = XCALLOC(MTYPE_RFAPI_VN_OPTION,
sizeof(struct rfapi_vn_option));
- assert(vo);
vo->type = RFAPI_VN_OPTION_TYPE_L2ADDR;
m = XCALLOC(MTYPE_RFAPI_MONITOR_ENCAP,
sizeof(struct rfapi_monitor_encap));
- assert(m);
m->node = vpn_rn;
m->bpi = vpn_bpi;
* service routine, which is supposed to free the wcb.
*/
wcb = XCALLOC(MTYPE_RFAPI_WITHDRAW, sizeof(struct rfapi_withdraw));
- assert(wcb);
wcb->node = rn;
wcb->info = bpi;
wcb->import_table = import_table;
struct agg_table *referenced_vpn_table;
referenced_vpn_table = agg_table_init();
- assert(referenced_vpn_table);
/*
* iterate over the set of monitors at this ENCAP node.
mnext = XCALLOC(
MTYPE_RFAPI_MONITOR_ENCAP,
sizeof(struct rfapi_monitor_encap));
- assert(mnext);
mnext->node = m->node;
mnext->next = referenced_vpn_prefix->info;
referenced_vpn_prefix->info = mnext;
if (!it) {
it = XCALLOC(MTYPE_RFAPI_IMPORTTABLE,
sizeof(struct rfapi_import_table));
- assert(it);
it->next = h->imports;
h->imports = it;
MTYPE_RFAPI_NVE_ADDR,
sizeof(struct
rfapi_nve_addr));
- assert(nap);
*nap = na;
nap->info = is_active
? pAHcount
vnc_zlog_debug_verbose("%s: rfd %p pfx %pRN life %u", __func__, rfd, rn,
ri->lifetime);
- ri->timer = NULL;
+
thread_add_timer(bm->master, rfapiRibExpireTimer, tcb, ri->lifetime,
&ri->timer);
- assert(ri->timer);
}
extern void rfapi_rib_key_init(struct prefix *prefix, /* may be NULL */
new = XCALLOC(MTYPE_RFAPI_NEXTHOP,
sizeof(struct rfapi_next_hop_entry));
- assert(new);
if (ri->rk.aux_prefix.family) {
rfapiQprefix2Rprefix(&ri->rk.aux_prefix,
new = XCALLOC(
MTYPE_RFAPI_NEXTHOP,
sizeof(struct rfapi_next_hop_entry));
- assert(new);
if (ri->rk.aux_prefix.family) {
rfapiQprefix2Rprefix(&ri->rk.aux_prefix,
urq = XCALLOC(MTYPE_RFAPI_UPDATED_RESPONSE_QUEUE,
sizeof(struct rfapi_updated_responses_queue));
- assert(urq);
if (!rfd->updated_responses_queue)
updated_responses_queue_init(rfd);
roec.val[7] = 0;
new = ecommunity_new();
- assert(new);
ecommunity_add_val(new, &roec, false, false);
if (!new->size) {
agg_unlock_node(etn);
} else {
eti = XCALLOC(MTYPE_RFAPI_ETI, sizeof(struct vnc_export_info));
- assert(eti);
eti->node = etn;
eti->peer = peer;
peer_lock(peer);