bgp_size_t size, struct bgp_nlri *mp_update,
struct bgp_nlri *mp_withdraw)
{
- int ret;
+ bgp_attr_parse_ret_t ret;
uint8_t flag = 0;
uint8_t type = 0;
bgp_size_t length;
Attribute Flags Error. The Data field contains the erroneous
attribute (type, length and value). */
if (bgp_attr_flag_invalid(&attr_args)) {
- bgp_attr_parse_ret_t ret;
ret = bgp_attr_malformed(
&attr_args, BGP_NOTIFY_UPDATE_ATTR_FLAG_ERR,
attr_args.total);
}
/* Check all mandatory well-known attributes are present */
- {
- bgp_attr_parse_ret_t ret;
- if ((ret = bgp_attr_check(peer, attr)) < 0) {
- if (as4_path)
- aspath_unintern(&as4_path);
- return ret;
- }
+ if ((ret = bgp_attr_check(peer, attr)) < 0) {
+ if (as4_path)
+ aspath_unintern(&as4_path);
+ return ret;
}
/*
for (rn = bgp_table_top(peer->bgp->rib[afi][safi]); rn;
rn = bgp_route_next(rn)) {
struct bgp_node *rm;
- struct bgp_info *ri;
/* look for neighbor in tables */
if ((table = rn->info) == NULL)
break;
if (ri) {
- union gw_addr add;
memset(&add, 0, sizeof(union gw_addr));
if (attrhash_cmp(ri->attr, attr_new)
&& overlay_index_equal(afi, ri, bgp_static->eth_s_id, &add)
continue;
}
if (type == bgp_show_type_prefix_longer) {
- struct prefix *p = output_arg;
-
+ p = output_arg;
if (!prefix_match(p, &rn->p))
continue;
}
for (afi = AFI_IP; afi < AFI_MAX; afi++)
for (i = 0; i < ZEBRA_ROUTE_MAX; i++) {
struct list *red_list;
- struct listnode *node;
struct bgp_redist *red;
red_list = bgp->redist[afi][i];
}
if (CHECK_FLAG(bgp->af_flags[afi][safi],
BGP_CONFIG_VRF_TO_VRF_IMPORT)) {
- struct listnode *node;
char *name;
for (ALL_LIST_ELEMENTS_RO(
rfapiProcessWithdraw(peer, rfd, p, prd, NULL, afi, safi, type, kill);
if (bi) {
- char buf[PREFIX_STRLEN];
-
prefix2str(p, buf, sizeof(buf));
vnc_zlog_debug_verbose(
"%s: Found route (safi=%d) to delete at prefix %s",
rfapiCopyUnEncap2VPN(ern->info, info_new);
agg_unlock_node(ern); /* undo lock in route_note_match */
} else {
- char buf[PREFIX_STRLEN];
+ char bpf[PREFIX_STRLEN];
- prefix2str(&vn_prefix, buf, sizeof(buf));
+ prefix2str(&vn_prefix, bpf, sizeof(bpf));
/* Not a big deal, just means VPN route got here first */
vnc_zlog_debug_verbose("%s: no encap route for vn addr %s",
- __func__, buf);
+ __func__, bpf);
info_new->extra->vnc.import.un_family = 0;
}
HVTYNL);
}
if (bi->extra && bi->extra->vnc.import.aux_prefix.family) {
- char buf[BUFSIZ];
const char *sp;
sp = rfapi_ntop(bi->extra->vnc.import.aux_prefix.family,
list_delete_all_node(adb_delete_list);
if (!(pPrefix && !RFAPI_0_PREFIX(pPrefix))) {
- void *cursor;
-
/*
* Caller didn't specify a prefix, or specified
* (0/32 or 0/128)
bgp_attr_dup(&hattr, attr); /* hattr becomes a ghost attr */
if (rmap) {
- struct bgp_info info;
+ struct bgp_info binfo;
route_map_result_t ret;
- memset(&info, 0, sizeof(info));
- info.peer = peer;
- info.attr = &hattr;
- ret = route_map_apply(rmap, prefix, RMAP_BGP, &info);
+ memset(&binfo, 0, sizeof(binfo));
+ binfo.peer = peer;
+ binfo.attr = &hattr;
+ ret = route_map_apply(rmap, prefix, RMAP_BGP, &binfo);
if (ret == RMAP_DENYMATCH) {
bgp_attr_flush(&hattr);
vnc_zlog_debug_verbose(
continue;
}
}
- struct isis_lsp *lsp =
- lsp_new(circuit->area, entry->id,
+ lsp = lsp_new(circuit->area, entry->id,
entry->rem_lifetime, 0, 0,
entry->checksum, lsp0, level);
lsp_insert(lsp,
sbuf_push(buf, indent, " Password: %s\n", obuf);
break;
case ISIS_PASSWD_TYPE_HMAC_MD5:
- for (unsigned int i = 0; i < 16; i++) {
- snprintf(obuf + 2 * i, sizeof(obuf) - 2 * i,
- "%02" PRIx8, auth->value[i]);
+ for (unsigned int j = 0; j < 16; j++) {
+ snprintf(obuf + 2 * j, sizeof(obuf) - 2 * j,
+ "%02" PRIx8, auth->value[j]);
}
sbuf_push(buf, indent, " HMAC-MD5: %s\n", obuf);
break;
* old as the route.
*/
if (listcount(route->paths) > 1) {
- struct listnode *anode;
- struct ospf6_path *o_path;
-
for (ALL_LIST_ELEMENTS_RO(route->paths, anode,
o_path)) {
inet_ntop(AF_INET,
IP addresses for these packets are the neighbors' IP
addresses. */
if (oi->type == OSPF_IFTYPE_NBMA) {
- struct route_node *rn;
struct ospf_neighbor *nbr;
for (rn = route_top(oi->nbrs); rn; rn = route_next(rn))
void ospf_ia_routing(struct ospf *ospf, struct route_table *rt,
struct route_table *rtrs)
{
+ struct listnode *node;
struct ospf_area *area;
if (IS_DEBUG_OSPF_EVENT)
zlog_debug("ospf_ia_routing():start");
if (IS_OSPF_ABR(ospf)) {
- struct listnode *node;
- struct ospf_area *area;
-
switch (ospf->abr_type) {
case OSPF_ABR_STAND:
if (IS_DEBUG_OSPF_EVENT)
zlog_debug("ospf_ia_routing():Standard ABR");
if ((area = ospf->backbone)) {
- struct listnode *node;
-
if (IS_DEBUG_OSPF_EVENT) {
zlog_debug(
"ospf_ia_routing():backbone area found");
break;
}
} else {
- struct listnode *node;
-
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
"ospf_ia_routing():not ABR, considering all areas");
ospf_router_lsa_update_area(oi->area);
if (oi->type == OSPF_IFTYPE_VIRTUALLINK) {
- struct ospf_area *vl_area = ospf_area_lookup_by_area_id(
+ vl_area = ospf_area_lookup_by_area_id(
oi->ospf, oi->vl_data->vl_area_id);
if (vl_area)
ospf_lsa_lock(lsa)); /* oi->ls_upd_queue */
if (send_lsupd_now) {
struct list *send_update_list;
- struct route_node *rn, *rnext;
+ struct route_node *rnext;
for (rn = route_top(oi->ls_upd_queue); rn; rn = rnext) {
rnext = route_next(rn);
/* Update distribute-list, and apply filter. */
for (type = 0; type <= ZEBRA_ROUTE_MAX; type++) {
struct list *red_list;
- struct listnode *node;
struct ospf_redist *red;
red_list = ospf->redist[type];
*/
for (type = 0; type <= ZEBRA_ROUTE_MAX; type++) {
struct list *red_list;
- struct listnode *node;
struct ospf_redist *red;
red_list = ospf->redist[type];
ospf_lsdb_free(ospf->lsdb);
for (rn = route_top(ospf->maxage_lsa); rn; rn = route_next(rn)) {
- struct ospf_lsa *lsa;
-
if ((lsa = rn->info) != NULL) {
ospf_lsa_unlock(&lsa);
rn->info = NULL;
for (i = ZEBRA_ROUTE_SYSTEM; i <= ZEBRA_ROUTE_MAX; i++) {
struct list *ext_list;
- struct listnode *node;
struct ospf_external *ext;
ext_list = ospf->external[i];