bgp_size_t total;
struct attr_extra *attre = NULL;
struct bgp_attr_encap_subtlv *stlv_last = NULL;
- uint16_t tunneltype;
+ uint16_t tunneltype = 0;
total = length + (CHECK_FLAG (flag, BGP_ATTR_FLAG_EXTLEN) ? 4 : 3);
#if ENABLE_BGP_VNC
/* type == RD_TYPE_VNC_ETH */
-void
+static void
decode_rd_vnc_eth (u_char *pnt, struct rd_vnc_eth *rd_vnc_eth)
{
rd_vnc_eth->type = RD_TYPE_VNC_ETH;
struct rfapi_nve_group_cfg *rfg;
struct rfapi *h;
struct rfapi_cfg *hc;
- struct prefix_rd prd;
int rc;
h = bgp->rfapi;
return rc;
}
-
- /*
- * Construct route distinguisher for VPN routes
- */
- prd = rfd->rd;
- prd.family = AF_UNSPEC;
- prd.prefixlen = 64;
-
/*
* re-advertise registered routes, this time as part of new NVE-group
*/
struct route_node *node;
struct bgp *bgp;
struct rfapi *h;
- struct rfapi_cfg *hc;
zlog_debug ("%s: rfd=%p", __func__, rfd);
return 0;
}
- hc = bgp->rfapi_cfg;
-
if (CHECK_FLAG (rfd->flags, RFAPI_HD_FLAG_CLOSING_ADMINISTRATIVELY))
{
rfapi_reopen (struct rfapi_descriptor *rfd, struct bgp *bgp)
{
struct rfapi *h;
- struct rfapi_cfg *hc;
int rc;
if ((rc = rfapi_close_inner (rfd, bgp)))
{
h = bgp->rfapi;
- hc = bgp->rfapi_cfg;
assert (!CHECK_FLAG (h->flags, RFAPI_INCALLBACK));
uint32_t *label = NULL;
struct rfapi_vn_option *vo;
struct rfapi_l2address_option *l2o = NULL;
- struct rfapi_nexthop *lnh = NULL;
struct prefix_rd *prd_override = NULL;
switch (action)
{
l2o = &vo->v.l2addr;
}
- if (RFAPI_VN_OPTION_TYPE_LOCAL_NEXTHOP == vo->type)
- {
- lnh = &vo->v.local_nexthop;
- }
if (RFAPI_VN_OPTION_TYPE_INTERNAL_RD == vo->type)
{
prd_override = &vo->v.internal_rd;
}
else
{
- int washolddown = 0;
-
zlog_debug ("%s: %s at prefix %s/%d",
__func__,
((action ==
import_table->holddown_count[afi] -= 1;
RFAPI_UPDATE_ITABLE_COUNT (bi, import_table, afi, 1);
-
- washolddown = 1;
}
/*
* decrement remote count (if route is remote) because
* then remove from pending list because the route
* hasn't changed.
*/
- int same = 0;
if (!rfapi_info_cmp (ori, ri))
{
- /* same: delete from pending list */
- same = 1;
-
skiplist_delete (slPendPt, &ri->rk, NULL);
assert (lPendCost);
if (lPendCost)
struct vty *vty;
void *out;
const char *vty_newline;
-
- uint32_t factor;
-
struct prefix pfx_un;
struct prefix pfx_vn;
uint8_t cost;
char buf_lifetime[BUFSIZ];
int nlines = 0;
- if (bgp && bgp->rfapi_cfg)
- factor = bgp->rfapi_cfg->rfp_cfg.holddown_factor;
- else
- factor = RFAPI_RFP_CFG_DEFAULT_HOLDDOWN_FACTOR;
-
-
if (!stream)
return 0; /* for debug log, print into buf & call output once */
struct prefix_rd prd;
struct route_map *rmap = NULL;
uint32_t local_pref;
- uint32_t *med = NULL;
{
char buf[BUFSIZ];
local_pref = calc_local_pref (iattr, peer);
- if (iattr && (iattr->flag & ATTR_FLAG_BIT (BGP_ATTR_MULTI_EXIT_DISC)))
- {
-
- med = &iattr->med;
- }
-
if (VNC_DEBUG(IMPORT_BGP_ADD_ROUTE))
{
char buf[BUFSIZ];
struct prefix *prefix)/* unicast route prefix */
{
struct prefix un;
- uint32_t lifetime;
- uint32_t *plifetime;
- struct bgp_attr_encap_subtlv *encaptlvs;
if (bi->type != ZEBRA_ROUTE_BGP && bi->type != ZEBRA_ROUTE_BGP_DIRECT)
{
memset (&vncHDResolveNve.un_addr, 0, sizeof (vncHDResolveNve.un_addr));
}
- if (rfapiGetVncLifetime (bi->attr, &lifetime))
- {
- plifetime = NULL;
- }
- else
- {
- plifetime = &lifetime;
- }
-
- if (bi->attr && bi->attr->extra)
- {
- encaptlvs = bi->attr->extra->vnc_subtlvs;
- }
- else
- {
- encaptlvs = NULL;
- }
-
del_vnc_route (&vncHDResolveNve, vncHDResolveNve.peer, bgp, SAFI_MPLS_VPN, prefix, /* unicast route prefix */
prd, ZEBRA_ROUTE_BGP_DIRECT, BGP_ROUTE_REDISTRIBUTE, NULL, 0); /* flags */
{
struct stream *s;
struct zapi_ipv4 api;
- unsigned long ifindex;
struct in_addr nexthop;
struct prefix_ipv4 p;
s = zclient->ibuf;
- ifindex = 0;
nexthop.s_addr = 0;
/* Type, flags, message. */
if (CHECK_FLAG (api.message, ZAPI_MESSAGE_IFINDEX))
{
api.ifindex_num = stream_getc (s);
- ifindex = stream_getl (s);
+ stream_getl (s);
}
if (CHECK_FLAG (api.message, ZAPI_MESSAGE_DISTANCE))
api.distance = stream_getc (s);
{
struct stream *s;
struct zapi_ipv6 api;
- unsigned long ifindex;
struct in6_addr nexthop;
struct prefix_ipv6 p;
s = zclient->ibuf;
- ifindex = 0;
memset (&nexthop, 0, sizeof (struct in6_addr));
/* Type, flags, message. */
if (CHECK_FLAG (api.message, ZAPI_MESSAGE_IFINDEX))
{
api.ifindex_num = stream_getc (s);
- ifindex = stream_getl (s);
+ stream_getl (s);
}
if (CHECK_FLAG (api.message, ZAPI_MESSAGE_DISTANCE))
api.distance = stream_getc (s);