mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 10:38:05 +00:00
bgpd: Cleanup some SA
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
56afaa8bcb
commit
46c3ce8327
@ -1500,8 +1500,7 @@ bgp_attr_as4_path (struct bgp_attr_parser_args *args, struct aspath **as4_path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Set aspath attribute flag. */
|
/* Set aspath attribute flag. */
|
||||||
if (as4_path)
|
attr->flag |= ATTR_FLAG_BIT (BGP_ATTR_AS4_PATH);
|
||||||
attr->flag |= ATTR_FLAG_BIT (BGP_ATTR_AS4_PATH);
|
|
||||||
|
|
||||||
return BGP_ATTR_PARSE_PROCEED;
|
return BGP_ATTR_PARSE_PROCEED;
|
||||||
}
|
}
|
||||||
|
@ -1158,16 +1158,13 @@ extcommunity_list_set (struct community_list_handler *ch,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (str)
|
if (style == EXTCOMMUNITY_LIST_STANDARD)
|
||||||
{
|
ecom = ecommunity_str2com (str, 0, 1);
|
||||||
if (style == EXTCOMMUNITY_LIST_STANDARD)
|
else
|
||||||
ecom = ecommunity_str2com (str, 0, 1);
|
regex = bgp_regcomp (str);
|
||||||
else
|
|
||||||
regex = bgp_regcomp (str);
|
|
||||||
|
|
||||||
if (! ecom && ! regex)
|
if (! ecom && ! regex)
|
||||||
return COMMUNITY_LIST_ERR_MALFORMED_VAL;
|
return COMMUNITY_LIST_ERR_MALFORMED_VAL;
|
||||||
}
|
|
||||||
|
|
||||||
if (ecom)
|
if (ecom)
|
||||||
ecom->str = ecommunity_ecom2str (ecom, ECOMMUNITY_FORMAT_DISPLAY, 0);
|
ecom->str = ecommunity_ecom2str (ecom, ECOMMUNITY_FORMAT_DISPLAY, 0);
|
||||||
@ -1180,8 +1177,7 @@ extcommunity_list_set (struct community_list_handler *ch,
|
|||||||
entry->config = ecommunity_ecom2str (ecom, ECOMMUNITY_FORMAT_COMMUNITY_LIST, 0);
|
entry->config = ecommunity_ecom2str (ecom, ECOMMUNITY_FORMAT_COMMUNITY_LIST, 0);
|
||||||
else if (regex)
|
else if (regex)
|
||||||
entry->config = XSTRDUP (MTYPE_COMMUNITY_LIST_CONFIG, str);
|
entry->config = XSTRDUP (MTYPE_COMMUNITY_LIST_CONFIG, str);
|
||||||
else
|
|
||||||
entry->config = NULL;
|
|
||||||
entry->u.ecom = ecom;
|
entry->u.ecom = ecom;
|
||||||
entry->reg = regex;
|
entry->reg = regex;
|
||||||
|
|
||||||
|
@ -626,7 +626,7 @@ bgp_dump_parse_time (const char *str)
|
|||||||
return 0;
|
return 0;
|
||||||
total += time * 60;
|
total += time * 60;
|
||||||
time = 0;
|
time = 0;
|
||||||
seen_h = 1;
|
seen_m = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -603,6 +603,8 @@ bgp_notify_send_with_data (struct peer *peer, u_char code, u_char sub_code,
|
|||||||
struct stream *s;
|
struct stream *s;
|
||||||
int length;
|
int length;
|
||||||
|
|
||||||
|
assert (data);
|
||||||
|
|
||||||
/* Allocate new stream. */
|
/* Allocate new stream. */
|
||||||
s = stream_new (BGP_MAX_PACKET_SIZE);
|
s = stream_new (BGP_MAX_PACKET_SIZE);
|
||||||
|
|
||||||
@ -614,8 +616,7 @@ bgp_notify_send_with_data (struct peer *peer, u_char code, u_char sub_code,
|
|||||||
stream_putc (s, sub_code); /* BGP notify sub_code */
|
stream_putc (s, sub_code); /* BGP notify sub_code */
|
||||||
|
|
||||||
/* If notify data is present. */
|
/* If notify data is present. */
|
||||||
if (data)
|
stream_write (s, data, datalen);
|
||||||
stream_write (s, data, datalen);
|
|
||||||
|
|
||||||
/* Set BGP packet length. */
|
/* Set BGP packet length. */
|
||||||
length = bgp_packet_set_size (s);
|
length = bgp_packet_set_size (s);
|
||||||
|
@ -8887,6 +8887,7 @@ bgp_show_community (struct vty *vty, struct bgp *bgp, int argc,
|
|||||||
int i;
|
int i;
|
||||||
char *str;
|
char *str;
|
||||||
int first = 0;
|
int first = 0;
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
b = buffer_new (1024);
|
b = buffer_new (1024);
|
||||||
for (i = 0; i < argc; i++)
|
for (i = 0; i < argc; i++)
|
||||||
@ -8915,9 +8916,12 @@ bgp_show_community (struct vty *vty, struct bgp *bgp, int argc,
|
|||||||
return CMD_WARNING;
|
return CMD_WARNING;
|
||||||
}
|
}
|
||||||
|
|
||||||
return bgp_show (vty, bgp, afi, safi,
|
ret = bgp_show (vty, bgp, afi, safi,
|
||||||
(exact ? bgp_show_type_community_exact :
|
(exact ? bgp_show_type_community_exact :
|
||||||
bgp_show_type_community), com, 0);
|
bgp_show_type_community), com, 0);
|
||||||
|
community_free (com);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
Loading…
Reference in New Issue
Block a user