newas = XREALLOC(MTYPE_AS_SEG_DATA, seg->as,
ASSEGMENT_DATA_SIZE(seg->length + num, 1));
- if (newas) {
- seg->as = newas;
- memcpy(seg->as + seg->length, asnos,
- ASSEGMENT_DATA_SIZE(num, 1));
- seg->length += num;
- return seg;
- }
-
- assegment_free_all(seg);
- return NULL;
+ seg->as = newas;
+ memcpy(seg->as + seg->length, asnos,
+ ASSEGMENT_DATA_SIZE(num, 1));
+ seg->length += num;
+ return seg;
}
static int int_cmp(const void *p1, const void *p2)
lp->requests = XCALLOC(MTYPE_BGP_LABEL_FIFO, sizeof(struct lp_fifo));
LABEL_FIFO_INIT(lp->requests);
lp->callback_q = work_queue_new(master, "label callbacks");
- if (!lp->callback_q) {
- zlog_err("%s: Failed to allocate work queue", __func__);
- exit(1);
- }
lp->callback_q->spec.workfunc = lp_cbq_docallback;
lp->callback_q->spec.del_item_data = lp_cbq_item_free;
void bgp_process_queue_init(void)
{
- if (!bm->process_main_queue) {
+ if (!bm->process_main_queue)
bm->process_main_queue =
work_queue_new(bm->master, "process_main_queue");
- if (!bm->process_main_queue) {
- zlog_err("%s: Failed to allocate work queue", __func__);
- exit(1);
- }
- }
-
bm->process_main_queue->spec.workfunc = &bgp_process_wq;
bm->process_main_queue->spec.del_item_data = &bgp_processq_del;
bm->process_main_queue->spec.max_retries = 0;
snprintf(wname, sizeof(wname), "clear %s", peer->host);
#undef CLEAR_QUEUE_NAME_LEN
- if ((peer->clear_node_queue = work_queue_new(bm->master, wname))
- == NULL) {
- zlog_err("%s: Failed to allocate work queue", __func__);
- exit(1);
- }
+ peer->clear_node_queue = work_queue_new(bm->master, wname);
peer->clear_node_queue->spec.hold = 10;
peer->clear_node_queue->spec.workfunc = &bgp_clear_route_node;
peer->clear_node_queue->spec.del_item_data = &bgp_clear_node_queue_del;
{
dict_t *new = XCALLOC(MTYPE_ISIS_DICT, sizeof(dict_t));
- if (new) {
- new->compare = comp;
- new->allocnode = dnode_alloc;
- new->freenode = dnode_free;
- new->context = NULL;
- new->nodecount = 0;
- new->maxcount = maxcount;
- new->nilnode.left = &new->nilnode;
- new->nilnode.right = &new->nilnode;
- new->nilnode.parent = &new->nilnode;
- new->nilnode.color = dnode_black;
- new->dupes = 0;
- }
+ new->compare = comp;
+ new->allocnode = dnode_alloc;
+ new->freenode = dnode_free;
+ new->context = NULL;
+ new->nodecount = 0;
+ new->maxcount = maxcount;
+ new->nilnode.left = &new->nilnode;
+ new->nilnode.right = &new->nilnode;
+ new->nilnode.parent = &new->nilnode;
+ new->nilnode.color = dnode_black;
+ new->dupes = 0;
+
return new;
}
dnode_t *dnode_create(void *data)
{
dnode_t *new = XCALLOC(MTYPE_ISIS_DICT_NODE, sizeof(dnode_t));
- if (new) {
- new->data = data;
- new->parent = NULL;
- new->left = NULL;
- new->right = NULL;
- }
+
+ new->data = data;
+ new->parent = NULL;
+ new->left = NULL;
+ new->right = NULL;
+
return new;
}
{
int sz = strlen(str) + 1;
char *new = XCALLOC(MTYPE_ISIS_TMP, sz);
- if (new)
- memcpy(new, str, sz);
+
+ memcpy(new, str, sz);
return new;
}
int i;
circuit = XCALLOC(MTYPE_ISIS_CIRCUIT, sizeof(struct isis_circuit));
- if (circuit == NULL) {
- zlog_err("Can't malloc isis circuit");
- return NULL;
- }
/*
* Default values
struct isis_spftree *tree;
tree = XCALLOC(MTYPE_ISIS_SPFTREE, sizeof(struct isis_spftree));
- if (tree == NULL) {
- zlog_err("ISIS-Spf: isis_spftree_new Out of memory!");
- return NULL;
- }
isis_vertex_queue_init(&tree->tents, "IS-IS SPF tents", true);
isis_vertex_queue_init(&tree->paths, "IS-IS SPF paths", false);
mtc = XCALLOC(MTYPE_ISIS_MPLS_TE, sizeof(struct mpls_te_circuit));
- if (mtc == NULL)
- return NULL;
-
mtc->status = disable;
mtc->type = STD_TE;
mtc->length = 0;
return CMD_WARNING_CONFIG_FAILED;
}
- if ((p = XMALLOC(MTYPE_TMP, strlen(cwd) + strlen(fname) + 2))
- == NULL) {
- zlog_err("config_log_file: Unable to alloc mem!");
- return CMD_WARNING_CONFIG_FAILED;
- }
+ p = XMALLOC(MTYPE_TMP, strlen(cwd) + strlen(fname) + 2);
sprintf(p, "%s/%s", cwd, fname);
fullpath = p;
} else
new = XCALLOC(MTYPE_WORK_QUEUE, sizeof(struct work_queue));
- if (new == NULL)
- return new;
-
new->name = XSTRDUP(MTYPE_WORK_QUEUE_NAME, queue_name);
new->master = m;
SET_FLAG(new->flags, WQ_UNPLUGGED);
assert(wq);
- if (!(item = work_queue_item_new(wq))) {
- zlog_err("%s: unable to get new queue item", __func__);
- return;
- }
+ item = work_queue_item_new(wq);
item->data = data;
work_queue_item_enqueue(wq, item);
struct nhrp_cache *p, *key = data;
p = XMALLOC(MTYPE_NHRP_CACHE, sizeof(struct nhrp_cache));
- if (p) {
- *p = (struct nhrp_cache){
- .cur.type = NHRP_CACHE_INVALID,
- .new.type = NHRP_CACHE_INVALID,
- .remote_addr = key->remote_addr,
- .ifp = key->ifp,
- .notifier_list =
- NOTIFIER_LIST_INITIALIZER(&p->notifier_list),
- };
- nhrp_cache_counts[p->cur.type]++;
- }
+
+ *p = (struct nhrp_cache){
+ .cur.type = NHRP_CACHE_INVALID,
+ .new.type = NHRP_CACHE_INVALID,
+ .remote_addr = key->remote_addr,
+ .ifp = key->ifp,
+ .notifier_list =
+ NOTIFIER_LIST_INITIALIZER(&p->notifier_list),
+ };
+ nhrp_cache_counts[p->cur.type]++;
return p;
}
afi_t afi;
nifp = XCALLOC(MTYPE_NHRP_IF, sizeof(struct nhrp_interface));
- if (!nifp)
- return 0;
ifp->info = nifp;
nifp->ifp = ifp;
}
nhs = XMALLOC(MTYPE_NHRP_NHS, sizeof(struct nhrp_nhs));
- if (!nhs)
- return NHRP_ERR_NO_MEMORY;
*nhs = (struct nhrp_nhs){
.afi = afi,
struct nhrp_peer *p, *key = data;
p = XMALLOC(MTYPE_NHRP_PEER, sizeof(*p));
- if (p) {
- *p = (struct nhrp_peer){
- .ref = 0,
- .ifp = key->ifp,
- .vc = key->vc,
- .notifier_list =
- NOTIFIER_LIST_INITIALIZER(&p->notifier_list),
- };
- nhrp_vc_notify_add(p->vc, &p->vc_notifier, nhrp_peer_vc_notify);
- nhrp_interface_notify_add(p->ifp, &p->ifp_notifier,
- nhrp_peer_ifp_notify);
- }
+
+ *p = (struct nhrp_peer){
+ .ref = 0,
+ .ifp = key->ifp,
+ .vc = key->vc,
+ .notifier_list =
+ NOTIFIER_LIST_INITIALIZER(&p->notifier_list),
+ };
+ nhrp_vc_notify_add(p->vc, &p->vc_notifier, nhrp_peer_vc_notify);
+ nhrp_interface_notify_add(p->ifp, &p->ifp_notifier,
+ nhrp_peer_ifp_notify);
+
return p;
}
struct nhrp_vc *vc, *key = data;
vc = XMALLOC(MTYPE_NHRP_VC, sizeof(struct nhrp_vc));
- if (vc) {
- *vc = (struct nhrp_vc){
- .local.nbma = key->local.nbma,
- .remote.nbma = key->remote.nbma,
- .notifier_list =
- NOTIFIER_LIST_INITIALIZER(&vc->notifier_list),
- };
- }
+
+ *vc = (struct nhrp_vc){
+ .local.nbma = key->local.nbma,
+ .remote.nbma = key->remote.nbma,
+ .notifier_list =
+ NOTIFIER_LIST_INITIALIZER(&vc->notifier_list),
+ };
return vc;
}
return 0;
sa = XMALLOC(MTYPE_NHRP_VC, sizeof(struct child_sa));
- if (!sa)
- return 0;
*sa = (struct child_sa){
.id = child_id,
struct zbuf *zb;
zb = XMALLOC(MTYPE_ZBUF_DATA, sizeof(*zb) + size);
- if (!zb)
- return NULL;
zbuf_init(zb, zb + 1, size, 0);
zb->allocated = 1;
oi = (struct ospf6_interface *)XCALLOC(MTYPE_OSPF6_IF,
sizeof(struct ospf6_interface));
- if (!oi) {
- zlog_err("Can't malloc ospf6_interface for ifindex %d",
- ifp->ifindex);
- return (struct ospf6_interface *)NULL;
- }
-
oi->area = (struct ospf6_area *)NULL;
oi->neighbor_list = list_new();
oi->neighbor_list->cmp = ospf6_neighbor_cmp;
recvnew = XMALLOC(MTYPE_OSPF6_MESSAGE, size);
sendnew = XMALLOC(MTYPE_OSPF6_MESSAGE, size);
- if (recvnew == NULL || sendnew == NULL) {
- if (recvnew)
- XFREE(MTYPE_OSPF6_MESSAGE, recvnew);
- if (sendnew)
- XFREE(MTYPE_OSPF6_MESSAGE, sendnew);
- zlog_debug("Could not allocate I/O buffer of size %d.", size);
- return iobuflen;
- }
if (recvbuf)
XFREE(MTYPE_OSPF6_MESSAGE, recvbuf);
on = (struct ospf6_neighbor *)XMALLOC(MTYPE_OSPF6_NEIGHBOR,
sizeof(struct ospf6_neighbor));
- if (on == NULL) {
- zlog_warn("neighbor: malloc failed");
- return NULL;
- }
memset(on, 0, sizeof(struct ospf6_neighbor));
inet_ntop(AF_INET, &router_id, buf, sizeof(buf));
/* Allocate memory for this LSA */
new_header = XMALLOC(MTYPE_OSPF6_LSA_HEADER, total_lsa_length);
- if (!new_header)
- return NULL;
/* LSA information structure */
lsa = (struct ospf6_lsa *)XCALLOC(MTYPE_OSPF6_LSA,
sizeof(struct ospf6_lsa));
- if (!lsa) {
- free(new_header);
- return NULL;
- }
lsa->header = (struct ospf6_lsa_header *)new_header;
/* Extract LSA from message */
lsalen = ntohs(cn->data.length);
lsa = XMALLOC(MTYPE_OSPF_APICLIENT, lsalen);
- if (!lsa) {
- fprintf(stderr, "LSA update: Cannot allocate memory for LSA\n");
- return;
- }
+
memcpy(lsa, &(cn->data), lsalen);
/* Invoke registered update callback function */
/* Extract LSA from message */
lsalen = ntohs(cn->data.length);
lsa = XMALLOC(MTYPE_OSPF_APICLIENT, lsalen);
- if (!lsa) {
- fprintf(stderr, "LSA delete: Cannot allocate memory for LSA\n");
- return;
- }
+
memcpy(lsa, &(cn->data), lsalen);
/* Invoke registered update callback function */
apiserv->filter =
XMALLOC(MTYPE_OSPF_APISERVER_MSGFILTER, ntohs(msg->hdr.msglen));
- if (apiserv->filter) {
- /* copy it over. */
- memcpy(apiserv->filter, &rmsg->filter, ntohs(msg->hdr.msglen));
- rc = OSPF_API_OK;
- } else {
- rc = OSPF_API_NOMEMORY;
- }
+
+ /* copy it over. */
+ memcpy(apiserv->filter, &rmsg->filter, ntohs(msg->hdr.msglen));
+ rc = OSPF_API_OK;
+
/* Send a reply back to client with return code */
rc = ospf_apiserver_send_reply(apiserv, seqnum, rc);
return rc;
}
new = XCALLOC(MTYPE_OSPF_EXT_PARAMS, sizeof(struct ext_itf));
- if (new == NULL) {
- zlog_warn("EXT (%s): XCALLOC: %s", __func__,
- safe_strerror(errno));
- return rc;
- }
/* initialize new information and link back the interface */
new->ifp = ifp;
oip = XCALLOC(MTYPE_OSPF_IF_PARAMS, sizeof(struct ospf_if_params));
- if (!oip)
- return NULL;
-
UNSET_IF_PARAM(oip, output_cost_cmd);
UNSET_IF_PARAM(oip, transmit_delay);
UNSET_IF_PARAM(oip, retransmit_interval);
lsa_prefix.prefixlen = sizeof(lsa_prefix.u.ptr) * CHAR_BIT;
lsa_prefix.u.ptr = (uintptr_t)lsa;
- if ((rn = route_node_get(ospf->maxage_lsa,
- (struct prefix *)&lsa_prefix))
- != NULL) {
- if (rn->info != NULL) {
- if (IS_DEBUG_OSPF(lsa, LSA_FLOODING))
- zlog_debug(
- "LSA[%s]: found LSA (%p) in table for LSA %p %d",
- dump_lsa_key(lsa), rn->info,
- (void *)lsa, lsa_prefix.prefixlen);
- route_unlock_node(rn);
- } else {
- rn->info = ospf_lsa_lock(lsa);
- SET_FLAG(lsa->flags, OSPF_LSA_IN_MAXAGE);
- }
+ rn = route_node_get(ospf->maxage_lsa, (struct prefix *)&lsa_prefix);
+ if (rn->info != NULL) {
+ if (IS_DEBUG_OSPF(lsa, LSA_FLOODING))
+ zlog_debug(
+ "LSA[%s]: found LSA (%p) in table for LSA %p %d",
+ dump_lsa_key(lsa), rn->info,
+ (void *)lsa, lsa_prefix.prefixlen);
+ route_unlock_node(rn);
} else {
- zlog_err("Unable to allocate memory for maxage lsa %s\n",
- dump_lsa_key(lsa));
- assert(0);
+ rn->info = ospf_lsa_lock(lsa);
+ SET_FLAG(lsa->flags, OSPF_LSA_IN_MAXAGE);
}
if (IS_DEBUG_OSPF(lsa, LSA_FLOODING))
}
}
- if ((new = XCALLOC(MTYPE_OSPF_OPAQUE_FUNCTAB,
- sizeof(struct ospf_opaque_functab)))
- == NULL) {
- zlog_warn("ospf_register_opaque_functab: XMALLOC: %s",
- safe_strerror(errno));
- goto out;
- }
+ new = XCALLOC(MTYPE_OSPF_OPAQUE_FUNCTAB,
+ sizeof(struct ospf_opaque_functab));
new->opaque_type = opaque_type;
new->oipt = NULL;
struct ospf *top;
struct opaque_info_per_type *oipt;
- if ((oipt = XCALLOC(MTYPE_OPAQUE_INFO_PER_TYPE,
- sizeof(struct opaque_info_per_type)))
- == NULL) {
- zlog_warn("register_opaque_info_per_type: XMALLOC: %s",
- safe_strerror(errno));
- goto out;
- }
+ oipt = XCALLOC(MTYPE_OPAQUE_INFO_PER_TYPE,
+ sizeof(struct opaque_info_per_type));
switch (new->data->type) {
case OSPF_OPAQUE_LINK_LSA:
{
struct opaque_info_per_id *oipi;
- if ((oipi = XCALLOC(MTYPE_OPAQUE_INFO_PER_ID,
- sizeof(struct opaque_info_per_id)))
- == NULL) {
- zlog_warn("register_opaque_info_per_id: XMALLOC: %s",
- safe_strerror(errno));
- goto out;
- }
+ oipi = XCALLOC(MTYPE_OPAQUE_INFO_PER_ID,
+ sizeof(struct opaque_info_per_id));
+
oipi->opaque_id = GET_OPAQUE_ID(ntohl(new->data->id.s_addr));
oipi->t_opaque_lsa_self = NULL;
oipi->opqctl_type = oipt;
listnode_add(oipt->id_list, oipi);
-out:
return oipi;
}
new = XMALLOC(MTYPE_OSPF_VERTEX_PARENT, sizeof(struct vertex_parent));
- if (new == NULL)
- return NULL;
-
new->parent = v;
new->backlink = backlink;
new->nexthop = hop;
/* Allocate Segment Routing node memory */
new = XCALLOC(MTYPE_OSPF_SR_PARAMS, sizeof(struct sr_node));
- /* Sanity Check */
- if (new == NULL) {
- zlog_err("SR (%s): Abort! can't create new SR node", __func__);
- return NULL;
- }
-
/* Default Algorithm, SRGB and MSD */
for (int i = 0; i < ALGORITHM_COUNT; i++)
new->algo[i] = SR_ALGORITHM_UNSET;
srl = XCALLOC(MTYPE_OSPF_SR_PARAMS, sizeof(struct sr_link));
- if (srl == NULL)
- return NULL;
-
/* Initialize TLV browsing */
length = ntohs(tlvh->length) - EXT_TLV_LINK_SIZE;
sub_tlvh = (struct tlv_header *)((char *)(tlvh) + TLV_HDR_SIZE
srp = XCALLOC(MTYPE_OSPF_SR_PARAMS, sizeof(struct sr_prefix));
- if (srp == NULL)
- return NULL;
-
/* Initialize TLV browsing */
length = ntohs(tlvh->length) - EXT_TLV_PREFIX_SIZE;
sub_tlvh = (struct tlv_header *)((char *)(tlvh) + TLV_HDR_SIZE
}
new = XCALLOC(MTYPE_OSPF_MPLS_TE, sizeof(struct mpls_te_link));
- if (new == NULL) {
- zlog_warn("ospf_mpls_te_new_if: XMALLOC: %s",
- safe_strerror(errno));
- return rc;
- }
new->instance = get_mpls_te_instance_value();
new->ifp = ifp;
pbr_ifp = XCALLOC(MTYPE_PBR_INTERFACE, sizeof(*pbr_ifp));
- if (!pbr_ifp) {
- zlog_err("%s: PBR XCALLOC(%zu) failure", __PRETTY_FUNCTION__,
- sizeof(*pbr_ifp));
- return 0;
- }
-
ifp->info = pbr_ifp;
return pbr_ifp;
}
if (!pim_br) {
pim_br = XCALLOC(MTYPE_PIM_BR, sizeof(*pim_br));
-
pim_br->sg = *sg;
listnode_add(pim_br_list, pim_br);
result = pim_rp_new(pim, rp, group, plist);
- if (result == PIM_MALLOC_FAIL) {
- vty_out(vty, "%% Out of memory\n");
- return CMD_WARNING_CONFIG_FAILED;
- }
-
if (result == PIM_GROUP_BAD_ADDRESS) {
vty_out(vty, "%% Bad group address specified: %s\n", group);
return CMD_WARNING_CONFIG_FAILED;
}
src = source_new(group, src_addr);
- if (!src) {
- return 0;
- }
return src;
}
/* E.4: if not found, create source with timer=GMI:
* (A-X-Y) */
source = source_new(group, *src_addr);
- if (!source) {
- /* ugh, internal malloc failure, skip source */
- continue;
- }
zassert(!source->t_source_timer); /* timer == 0 */
igmp_source_reset_gmi(group->group_igmp_sock, group,
source);
/* I.4: if not found, create source with timer=0 (B-A)
*/
source = source_new(group, *src_addr);
- if (!source) {
- /* ugh, internal malloc failure, skip source */
- continue;
- }
zassert(!source->t_source_timer); /* (B-A) timer=0 */
}
} else {
/* If not found, create new source */
source = source_new(group, *src_addr);
- if (!source) {
- /* ugh, internal malloc failure, skip source */
- continue;
- }
}
/* (B)=GMI */
} else {
/* If not found, create new source */
source = source_new(group, *src_addr);
- if (!source) {
- /* ugh, internal malloc failure, skip source */
- continue;
- }
}
/* (A)=GMI */
/* If source not found, create source with timer=0:
* (B-A)=0 */
source = source_new(group, *src_addr);
- if (!source) {
- /* ugh, internal malloc failure, skip source */
- continue;
- }
zassert(!source->t_source_timer); /* (B-A) timer=0 */
}
* (A-X-Y)=Group Timer */
long group_timer_msec;
source = source_new(group, *src_addr);
- if (!source) {
- /* ugh, internal malloc failure, skip source */
- continue;
- }
zassert(!source->t_source_timer); /* timer == 0 */
group_timer_msec = igmp_group_timer_remain_msec(group);
* (A-X-Y)=Group Timer */
long group_timer_msec;
source = source_new(group, *src_addr);
- if (!source) {
- /* ugh, internal malloc failure, skip source */
- continue;
- }
zassert(!source->t_source_timer); /* timer == 0 */
group_timer_msec = igmp_group_timer_remain_msec(group);
struct route_node *rn;
pim->rp_list = list_new();
- if (!pim->rp_list) {
- zlog_err("Unable to alloc rp_list");
- return;
- }
pim->rp_list->del = (void (*)(void *))pim_rp_info_free;
pim->rp_list->cmp = pim_rp_list_cmp;
pim->rp_table = route_table_init();
- if (!pim->rp_table) {
- zlog_err("Unable to alloc rp_table");
- list_delete_and_null(&pim->rp_list);
- return;
- }
rp_info = XCALLOC(MTYPE_PIM_RP, sizeof(*rp_info));
listnode_add(pim->rp_list, rp_info);
rn = route_node_get(pim->rp_table, &rp_info->group);
- if (!rn) {
- zlog_err("Failure to get route node for pim->rp_table");
- list_delete_and_null(&pim->rp_list);
- route_table_finish(pim->rp_table);
- XFREE(MTYPE_PIM_RP, rp_info);
- return;
- }
-
rn->info = rp_info;
if (PIM_DEBUG_TRACE)
zlog_debug(
/* PIM error codes */
#define PIM_SUCCESS 0
-#define PIM_MALLOC_FAIL -1
#define PIM_GROUP_BAD_ADDRESS -2
#define PIM_GROUP_OVERLAP -3
#define PIM_GROUP_PFXLIST_OVERLAP -4
"Enable a routing process\n"
"Routing Information Protocol (RIP)\n")
{
- int ret;
-
/* If rip is not enabled before. */
if (!rip) {
- ret = rip_create();
- if (ret < 0) {
- zlog_info("Can't create RIP");
- return CMD_WARNING_CONFIG_FAILED;
- }
+ rip_create();
}
VTY_PUSH_CONTEXT(RIP_NODE, rip);
if (needed > lastneeded || needed < lastneeded / 2) {
if (buf != NULL)
XFREE(MTYPE_TMP, buf);
- if ((buf = XMALLOC(MTYPE_TMP, needed)) == NULL) {
- zlog_warn("interface_list_ioctl: malloc failed");
- close(sock);
- return -1;
- }
+ buf = XMALLOC(MTYPE_TMP, needed);
}
lastneeded = needed;
}
/* otherwise create a new one */
lmc = XCALLOC(MTYPE_LM_CHUNK, sizeof(struct label_manager_chunk));
- if (!lmc)
- return NULL;
if (list_isempty(lbl_mgr.lc_list))
lmc->start = MPLS_LABEL_UNRESERVED_MIN;
if (!fec) {
fec = XCALLOC(MTYPE_FEC, sizeof(zebra_fec_t));
- if (!fec)
- return NULL;
rn->info = fec;
fec->rn = rn;
return NULL;
nhlfe = XCALLOC(MTYPE_NHLFE, sizeof(zebra_nhlfe_t));
- if (!nhlfe)
- return NULL;
nhlfe->lsp = lsp;
nhlfe->type = lsp_type;
unsigned i;
new = XCALLOC(MTYPE_WORK_QUEUE, sizeof(struct meta_queue));
- assert(new);
for (i = 0; i < MQ_SIZE; i++) {
new->subq[i] = list_new();
prefix_len = XMALLOC(MTYPE_ROUTE_MAP_COMPILED, sizeof(uint32_t));
- if (!prefix_len)
- return prefix_len;
-
*prefix_len = tmpval;
return prefix_len;
}
zebra_vtep_t *zvtep;
zvtep = XCALLOC(MTYPE_ZVNI_VTEP, sizeof(zebra_vtep_t));
- if (!zvtep) {
- zlog_err("Failed to alloc VTEP entry, VNI %u", zvni->vni);
- return NULL;
- }
zvtep->vtep_ip = *vtep_ip;