attr.nexthop = vpn->originator_ip;
attr.mp_nexthop_global_in = vpn->originator_ip;
attr.mp_nexthop_len = BGP_ATTR_NHLEN_IPV4;
- attr.sticky = CHECK_FLAG(flags, ZEBRA_MAC_TYPE_STICKY) ? 1 : 0;
+ attr.sticky = CHECK_FLAG(flags, ZEBRA_MACIP_TYPE_STICKY) ? 1 : 0;
attr.default_gw = CHECK_FLAG(flags, ZEBRA_MACIP_TYPE_GW) ? 1 : 0;
attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_PMSI_TUNNEL);
bgpevpn_get_rmac(vpn, &attr.rmac);
char *bgp_evpn_label2str(mpls_label_t *label, u_int32_t num_labels,
char *buf, int len)
{
- vni_t vni;
vni_t vni1, vni2;
vni1 = label2vni(label);
zlog_err(
"%u:Failed to create Type-2 route, VNI %u %s MAC %s IP %s (flags: 0x%x)",
bgp->vrf_id, vpn->vni,
- CHECK_FLAG(flags, ZEBRA_MAC_TYPE_STICKY) ? "sticky gateway"
+ CHECK_FLAG(flags, ZEBRA_MACIP_TYPE_STICKY) ? "sticky gateway"
: "",
prefix_mac2str(mac, buf, sizeof(buf)),
ipaddr2str(ip, buf2, sizeof(buf2)),
ri->uptime = bgp_clock();
#if ENABLE_BGP_VNC
if (ri->extra)
- label = decode_label(&ri->extra->label);
+ label = decode_label(&ri->extra->label[0]);
#endif
/* Process change. */
/* save backref to rfapi handle */
assert(bgp_info_extra_get(new));
new->extra->vnc.export.rfapi_handle = (void *)rfd;
- encode_label(label_val, &new->extra->label);
+ encode_label(label_val, &new->extra->label[0]);
/* debug */
rfapi_time(&new->extra->vnc.import.create_time);
}
if (label)
- encode_label(*label, &new->extra->label);
+ encode_label(*label, &new->extra->label[0]);
new->type = type;
new->sub_type = sub_type;
new->peer = peer;
vo->v.l2addr.local_nve_id = bi->extra->vnc.import.rd.val[1];
/* label comes from MP_REACH_NLRI label */
- vo->v.l2addr.label = decode_label(&bi->extra->label);
+ vo->v.l2addr.label = decode_label(&bi->extra->label[0]);
new->vn_options = vo;
if (bi->extra)
label = decode_label(
- &bi->extra->label);
+ &bi->extra->label[0]);
(*rfapiBgpInfoFilteredImportFunction(
safi))(
it, /* which import table */
vo->v.l2addr.local_nve_id = bi->extra->vnc.import.rd.val[1];
/* label comes from MP_REACH_NLRI label */
- vo->v.l2addr.label = decode_label(&bi->extra->label);
+ vo->v.l2addr.label = decode_label(&bi->extra->label[0]);
rfapi_vn_options_free(
ri->vn_options); /* maybe free old version */
}
if (bi->extra != NULL)
- vty_out(vty, " label=%u", decode_label(&bi->extra->label));
+ vty_out(vty, " label=%u", decode_label(&bi->extra->label[0]));
if (!rfapiGetVncLifetime(bi->attr, &lifetime)) {
vty_out(vty, " life=%d", lifetime);
inet_ntop(pfx_vn.family, &pfx_vn.u.prefix, buf_ntop,
BUFSIZ));
if (bi->extra) {
- u_int32_t l = decode_label(&bi->extra->label);
+ u_int32_t l = decode_label(&bi->extra->label[0]);
snprintf(buf_vn, BUFSIZ, "Label: %d", l);
} else /* should never happen */
{
}
}
if (tun_type != BGP_ENCAP_TYPE_MPLS && bi->extra) {
- u_int32_t l = decode_label(&bi->extra->label);
+ u_int32_t l = decode_label(&bi->extra->label[0]);
if (!MPLS_LABEL_IS_NULL(l)) {
fp(out, " Label: %d", l);
if (nlines == 1)
NULL, /* attr, ignored */
afi, SAFI_UNICAST, ZEBRA_ROUTE_VNC_DIRECT,
BGP_ROUTE_REDISTRIBUTE, NULL, /* RD not used for unicast */
- NULL, NULL); /* tag not used for unicast */
+ NULL, 0, NULL); /* tag not used for unicast */
}
static void vnc_direct_bgp_vpn_enable_ce(struct bgp *bgp, afi_t afi)
ZEBRA_ROUTE_VNC_DIRECT,
BGP_ROUTE_REDISTRIBUTE,
NULL, /* RD not used for unicast */
- NULL,
+ NULL, 0,
NULL); /* tag not used for unicast */
}
}
afi, SAFI_UNICAST, ZEBRA_ROUTE_VNC_DIRECT,
BGP_ROUTE_REDISTRIBUTE,
NULL, /* RD not used for unicast */
- NULL, NULL); /* tag not used for unicast */
+ NULL, 0, NULL); /* tag not used for unicast */
/*
* yuck!
* - but consistent with rest of function
afi, SAFI_UNICAST, ZEBRA_ROUTE_VNC_DIRECT,
BGP_ROUTE_REDISTRIBUTE,
NULL, /* RD not used for unicast */
- NULL, NULL); /* tag not used for unicast */
+ NULL, 0, NULL); /* tag not used for unicast */
}
}
}
unicast */
NULL, /* tag not used for
unicast */
- 0, NULL); /* EVPN not used */
+ 0, 0, NULL); /* EVPN not used */
bgp_attr_unintern(&iattr);
}
BGP_ROUTE_REDISTRIBUTE,
NULL, /* RD not used for
unicast */
- NULL, NULL); /* tag not
+ NULL, 0, NULL); /* tag not
used for
unicast */
}
BGP_ROUTE_REDISTRIBUTE,
NULL, /* RD not used for unicast */
NULL, /* tag not used for unicast */
- 0, NULL); /* EVPN not used */
+ 0, 0, NULL); /* EVPN not used */
bgp_attr_unintern(&iattr);
ZEBRA_ROUTE_VNC_DIRECT,
BGP_ROUTE_REDISTRIBUTE,
NULL, /* RD not used for unicast */
- NULL,
+ NULL, 0,
NULL); /* tag not used for unicast */
return;
}
BGP_ROUTE_REDISTRIBUTE,
NULL, /* RD not used for
unicast */
- NULL, NULL); /* tag not
+ NULL, 0, NULL); /* tag not
used for
unicast,
EVPN
afi, SAFI_UNICAST, ZEBRA_ROUTE_VNC_DIRECT_RH,
BGP_ROUTE_REDISTRIBUTE, NULL, /* RD not used for unicast */
NULL, /* tag not used for unicast, EVPN neither */
- 0, NULL); /* EVPN not used */
+ 0, 0, NULL); /* EVPN not used */
bgp_attr_unintern(&iattr);
}
NULL, /* attr, ignored */
family2afi(eti->node->p.family), SAFI_UNICAST, eti->type,
eti->subtype, NULL, /* RD not used for unicast */
- NULL, NULL); /* tag not used for unicast, EVPN neither */
+ NULL, 0, NULL); /* tag not used for unicast, EVPN neither */
/*
* Free the eti
NULL, /* tag not used for
unicast, EVPN
neither */
- 0, NULL); /* EVPN not used */
+ 0, 0, NULL); /* EVPN not used */
bgp_attr_unintern(&iattr);
}
}
ZEBRA_ROUTE_VNC_DIRECT_RH,
BGP_ROUTE_REDISTRIBUTE,
NULL, /* RD not used for unicast */
- NULL, NULL); /* tag not used for
+ NULL, 0, NULL); /* tag not used for
unicast, EVPN
neither */
}
ecommunity_merge(new_ecom, bi->attr->ecommunity);
if (bi->extra)
- label = decode_label(&bi->extra->label);
+ label = decode_label(&bi->extra->label[0]);
add_vnc_route(&vncHDResolveNve, bgp, SAFI_MPLS_VPN,
prefix, /* unicast route prefix */
prd = &bi_interior->extra->vnc.import
.rd;
label = decode_label(
- &bi_interior->extra->label);
+ &bi_interior->extra->label[0]);
} else
prd = NULL;
prd = &bi_interior->extra->vnc.import
.rd;
label = decode_label(
- &bi_interior->extra->label);
+ &bi_interior->extra->label[0]);
} else
prd = NULL;
if (bi_interior->extra) {
prd = &bi_interior->extra->vnc.import.rd;
label = decode_label(
- &bi_interior->extra->label);
+ &bi_interior->extra->label[0]);
} else
prd = NULL;
if (bi->extra) {
prd = &bi->extra->vnc.import.rd;
label = decode_label(
- &bi->extra->label);
+ &bi->extra->label[0]);
} else
prd = NULL;
prd = &bi_interior->extra->vnc.import
.rd;
label = decode_label(
- &bi_interior->extra->label);
+ &bi_interior->extra->label[0]);
} else
prd = NULL;
if (bi_interior->extra) {
prd = &bi_interior->extra->vnc.import.rd;
label = decode_label(
- &bi_interior->extra->label);
+ &bi_interior->extra->label[0]);
} else
prd = NULL;
if (bi_interior->extra) {
prd = &bi_interior->extra->vnc.import.rd;
- label = decode_label(&bi_interior->extra->label);
+ label = decode_label(&bi_interior->extra->label[0]);
} else
prd = NULL;
if (bi->extra) {
prd = &bi->extra->vnc.import.rd;
- label = decode_label(&bi->extra->label);
+ label = decode_label(
+ &bi->extra->label[0]);
} else
prd = NULL;
if (!zvrf)
return CMD_WARNING;
- ret = zebra_vxlan_process_vrf_vni_cmd(zvrf, vni, err, 1);
+ ret = zebra_vxlan_process_vrf_vni_cmd(zvrf, vni, err, ERR_STR_SZ, 1);
if (ret != 0) {
vty_out(vty, "%s\n", err);
return CMD_WARNING;
if (!zvrf)
return CMD_WARNING;
- ret = zebra_vxlan_process_vrf_vni_cmd(zvrf, vni, err, 0);
+ ret = zebra_vxlan_process_vrf_vni_cmd(zvrf, vni, err, ERR_STR_SZ, 0);
if (ret != 0) {
vty_out(vty, "%s\n", err);
return CMD_WARNING;
assert(vrf);
assert(zvrf);
+ /* Mark as having FRR configuration */
+ vrf_set_user_cfged(vrf);
ret = zebra_vxlan_process_vrf_vni_cmd(zvrf, vni, err, ERR_STR_SZ, 1);
if (ret != 0) {
vty_out(vty, "%s\n", err);
struct stream *s = NULL;
char buf[PREFIX_STRLEN];
- client = zebra_find_client(ZEBRA_ROUTE_BGP);
+ client = zebra_find_client(ZEBRA_ROUTE_BGP, 0);
/* BGP may not be running. */
if (!client)
return 0;