summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_attr.c90
-rw-r--r--bgpd/bgp_attr.h41
-rw-r--r--bgpd/bgp_evpn.c4
-rw-r--r--bgpd/bgp_evpn_mh.c6
-rw-r--r--bgpd/bgp_evpn_vty.c34
-rw-r--r--bgpd/bgp_mpath.c12
-rw-r--r--bgpd/bgp_mplsvpn.c11
-rw-r--r--bgpd/bgp_mplsvpn.h4
-rw-r--r--bgpd/bgp_packet.c2
-rw-r--r--bgpd/bgp_route.c19
-rw-r--r--bgpd/bgp_routemap.c17
-rw-r--r--bgpd/bgp_updgrp.c2
-rw-r--r--bgpd/bgp_updgrp.h9
-rw-r--r--bgpd/bgp_updgrp_adv.c2
-rw-r--r--bgpd/bgp_updgrp_packet.c6
-rw-r--r--bgpd/bgp_vty.c26
-rw-r--r--bgpd/bgpd.c22
-rw-r--r--bgpd/bgpd.h18
-rw-r--r--bgpd/rfapi/rfapi.c4
-rw-r--r--bgpd/rfapi/vnc_export_bgp.c3
-rw-r--r--doc/user/pimv6.rst8
-rw-r--r--pimd/pim6_cmd.c31
-rw-r--r--pimd/pim6_cmd.h1
-rw-r--r--pimd/pim_cmd.c38
-rw-r--r--pimd/pim_cmd_common.c22
-rw-r--r--pimd/pim_cmd_common.h2
-rw-r--r--pimd/pim_ssmpingd.c6
-rw-r--r--pimd/pim_vty.c4
-rwxr-xr-xtests/topotests/multicast_pim_sm_topo3/test_multicast_pim_sm_topo3.py12
-rw-r--r--zebra/zebra_evpn_mh.c25
30 files changed, 242 insertions, 239 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index 2f246e61d8..e1ee027700 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -986,6 +986,10 @@ struct attr *bgp_attr_aggregate_intern(
attr.origin = origin;
attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_ORIGIN);
+ /* MED */
+ attr.med = 0;
+ attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_MULTI_EXIT_DISC);
+
/* AS path attribute. */
if (aspath)
attr.aspath = aspath_intern(aspath);
@@ -1008,18 +1012,13 @@ struct attr *bgp_attr_aggregate_intern(
}
bgp_attr_set_community(&attr, community);
- attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_COMMUNITIES);
}
- if (ecommunity) {
+ if (ecommunity)
bgp_attr_set_ecommunity(&attr, ecommunity);
- attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES);
- }
- if (lcommunity) {
+ if (lcommunity)
bgp_attr_set_lcommunity(&attr, lcommunity);
- attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_LARGE_COMMUNITIES);
- }
if (bgp_in_graceful_shutdown(bgp))
bgp_attr_add_gshut_community(&attr);
@@ -1096,22 +1095,18 @@ void bgp_attr_unintern_sub(struct attr *attr)
comm = bgp_attr_get_community(attr);
community_unintern(&comm);
- UNSET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_COMMUNITIES));
bgp_attr_set_community(attr, NULL);
ecomm = bgp_attr_get_ecommunity(attr);
ecommunity_unintern(&ecomm);
- UNSET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES));
bgp_attr_set_ecommunity(attr, NULL);
ipv6_ecomm = bgp_attr_get_ipv6_ecommunity(attr);
ecommunity_unintern(&ipv6_ecomm);
- UNSET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_IPV6_EXT_COMMUNITIES));
bgp_attr_set_ipv6_ecommunity(attr, NULL);
lcomm = bgp_attr_get_lcommunity(attr);
lcommunity_unintern(&lcomm);
- UNSET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_LARGE_COMMUNITIES));
bgp_attr_set_lcommunity(attr, NULL);
cluster = bgp_attr_get_cluster(attr);
@@ -1243,7 +1238,7 @@ void bgp_attr_flush(struct attr *attr)
* are partial/optional and hence where the error likely was not
* introduced by the sending neighbour.
*/
-static bgp_attr_parse_ret_t
+static enum bgp_attr_parse_ret
bgp_attr_malformed(struct bgp_attr_parser_args *args, uint8_t subcode,
bgp_size_t length)
{
@@ -1450,7 +1445,8 @@ static bool bgp_attr_flag_invalid(struct bgp_attr_parser_args *args)
}
/* Get origin attribute of the update message. */
-static bgp_attr_parse_ret_t bgp_attr_origin(struct bgp_attr_parser_args *args)
+static enum bgp_attr_parse_ret
+bgp_attr_origin(struct bgp_attr_parser_args *args)
{
struct peer *const peer = args->peer;
struct attr *const attr = args->attr;
@@ -1520,8 +1516,8 @@ static int bgp_attr_aspath(struct bgp_attr_parser_args *args)
return BGP_ATTR_PARSE_PROCEED;
}
-static bgp_attr_parse_ret_t bgp_attr_aspath_check(struct peer *const peer,
- struct attr *const attr)
+static enum bgp_attr_parse_ret bgp_attr_aspath_check(struct peer *const peer,
+ struct attr *const attr)
{
/* These checks were part of bgp_attr_aspath, but with
* as4 we should to check aspath things when
@@ -1603,8 +1599,8 @@ static int bgp_attr_as4_path(struct bgp_attr_parser_args *args,
/*
* Check that the nexthop attribute is valid.
*/
-bgp_attr_parse_ret_t
-bgp_attr_nexthop_valid(struct peer *peer, struct attr *attr)
+enum bgp_attr_parse_ret bgp_attr_nexthop_valid(struct peer *peer,
+ struct attr *attr)
{
in_addr_t nexthop_h;
@@ -1633,7 +1629,8 @@ bgp_attr_nexthop_valid(struct peer *peer, struct attr *attr)
}
/* Nexthop attribute. */
-static bgp_attr_parse_ret_t bgp_attr_nexthop(struct bgp_attr_parser_args *args)
+static enum bgp_attr_parse_ret
+bgp_attr_nexthop(struct bgp_attr_parser_args *args)
{
struct peer *const peer = args->peer;
struct attr *const attr = args->attr;
@@ -1655,7 +1652,7 @@ static bgp_attr_parse_ret_t bgp_attr_nexthop(struct bgp_attr_parser_args *args)
}
/* MED atrribute. */
-static bgp_attr_parse_ret_t bgp_attr_med(struct bgp_attr_parser_args *args)
+static enum bgp_attr_parse_ret bgp_attr_med(struct bgp_attr_parser_args *args)
{
struct peer *const peer = args->peer;
struct attr *const attr = args->attr;
@@ -1678,7 +1675,7 @@ static bgp_attr_parse_ret_t bgp_attr_med(struct bgp_attr_parser_args *args)
}
/* Local preference attribute. */
-static bgp_attr_parse_ret_t
+static enum bgp_attr_parse_ret
bgp_attr_local_pref(struct bgp_attr_parser_args *args)
{
struct peer *const peer = args->peer;
@@ -1790,7 +1787,7 @@ static int bgp_attr_aggregator(struct bgp_attr_parser_args *args)
}
/* New Aggregator attribute */
-static bgp_attr_parse_ret_t
+static enum bgp_attr_parse_ret
bgp_attr_as4_aggregator(struct bgp_attr_parser_args *args,
as_t *as4_aggregator_as,
struct in_addr *as4_aggregator_addr)
@@ -1834,7 +1831,7 @@ bgp_attr_as4_aggregator(struct bgp_attr_parser_args *args,
/* Munge Aggregator and New-Aggregator, AS_PATH and NEW_AS_PATH.
*/
-static bgp_attr_parse_ret_t
+static enum bgp_attr_parse_ret
bgp_attr_munge_as4_attrs(struct peer *const peer, struct attr *const attr,
struct aspath *as4_path, as_t as4_aggregator,
struct in_addr *as4_aggregator_addr)
@@ -1936,7 +1933,7 @@ bgp_attr_munge_as4_attrs(struct peer *const peer, struct attr *const attr,
}
/* Community attribute. */
-static bgp_attr_parse_ret_t
+static enum bgp_attr_parse_ret
bgp_attr_community(struct bgp_attr_parser_args *args)
{
struct peer *const peer = args->peer;
@@ -1963,13 +1960,11 @@ bgp_attr_community(struct bgp_attr_parser_args *args)
return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_OPT_ATTR_ERR,
args->total);
- attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_COMMUNITIES);
-
return BGP_ATTR_PARSE_PROCEED;
}
/* Originator ID attribute. */
-static bgp_attr_parse_ret_t
+static enum bgp_attr_parse_ret
bgp_attr_originator_id(struct bgp_attr_parser_args *args)
{
struct peer *const peer = args->peer;
@@ -1997,7 +1992,7 @@ bgp_attr_originator_id(struct bgp_attr_parser_args *args)
}
/* Cluster list attribute. */
-static bgp_attr_parse_ret_t
+static enum bgp_attr_parse_ret
bgp_attr_cluster_list(struct bgp_attr_parser_args *args)
{
struct peer *const peer = args->peer;
@@ -2268,7 +2263,7 @@ int bgp_mp_unreach_parse(struct bgp_attr_parser_args *args,
}
/* Large Community attribute. */
-static bgp_attr_parse_ret_t
+static enum bgp_attr_parse_ret
bgp_attr_large_community(struct bgp_attr_parser_args *args)
{
struct peer *const peer = args->peer;
@@ -2294,13 +2289,11 @@ bgp_attr_large_community(struct bgp_attr_parser_args *args)
return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_OPT_ATTR_ERR,
args->total);
- attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_LARGE_COMMUNITIES);
-
return BGP_ATTR_PARSE_PROCEED;
}
/* Extended Community attribute. */
-static bgp_attr_parse_ret_t
+static enum bgp_attr_parse_ret
bgp_attr_ext_communities(struct bgp_attr_parser_args *args)
{
struct peer *const peer = args->peer;
@@ -2332,8 +2325,6 @@ bgp_attr_ext_communities(struct bgp_attr_parser_args *args)
return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_OPT_ATTR_ERR,
args->total);
- attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES);
-
/* Extract DF election preference and mobility sequence number */
attr->df_pref = bgp_attr_df_pref_from_ec(attr, &attr->df_alg);
@@ -2376,7 +2367,7 @@ bgp_attr_ext_communities(struct bgp_attr_parser_args *args)
}
/* IPv6 Extended Community attribute. */
-static bgp_attr_parse_ret_t
+static enum bgp_attr_parse_ret
bgp_attr_ipv6_ext_communities(struct bgp_attr_parser_args *args)
{
struct peer *const peer = args->peer;
@@ -2403,8 +2394,6 @@ bgp_attr_ipv6_ext_communities(struct bgp_attr_parser_args *args)
return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_OPT_ATTR_ERR,
args->total);
- attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_IPV6_EXT_COMMUNITIES);
-
return BGP_ATTR_PARSE_PROCEED;
}
@@ -2541,7 +2530,7 @@ static int bgp_attr_encap(uint8_t type, struct peer *peer, /* IN */
/* SRv6 Service Data Sub-Sub-TLV attribute
* draft-ietf-bess-srv6-services-07
*/
-static bgp_attr_parse_ret_t
+static enum bgp_attr_parse_ret
bgp_attr_srv6_service_data(struct bgp_attr_parser_args *args)
{
struct peer *const peer = args->peer;
@@ -2622,7 +2611,7 @@ bgp_attr_srv6_service_data(struct bgp_attr_parser_args *args)
/* SRv6 Service Sub-TLV attribute
* draft-ietf-bess-srv6-services-07
*/
-static bgp_attr_parse_ret_t
+static enum bgp_attr_parse_ret
bgp_attr_srv6_service(struct bgp_attr_parser_args *args)
{
struct peer *const peer = args->peer;
@@ -2631,7 +2620,7 @@ bgp_attr_srv6_service(struct bgp_attr_parser_args *args)
uint8_t type, sid_flags;
uint16_t length, endpoint_behavior;
size_t headersz = sizeof(type) + sizeof(length);
- bgp_attr_parse_ret_t err;
+ enum bgp_attr_parse_ret err;
char buf[BUFSIZ];
if (STREAM_READABLE(peer->curr) < headersz) {
@@ -2717,8 +2706,9 @@ bgp_attr_srv6_service(struct bgp_attr_parser_args *args)
* Read an individual SID value returning how much data we have read
* Returns 0 if there was an error that needs to be passed up the stack
*/
-static bgp_attr_parse_ret_t bgp_attr_psid_sub(uint8_t type, uint16_t length,
- struct bgp_attr_parser_args *args)
+static enum bgp_attr_parse_ret
+bgp_attr_psid_sub(uint8_t type, uint16_t length,
+ struct bgp_attr_parser_args *args)
{
struct peer *const peer = args->peer;
struct attr *const attr = args->attr;
@@ -2925,11 +2915,11 @@ static bgp_attr_parse_ret_t bgp_attr_psid_sub(uint8_t type, uint16_t length,
/* Prefix SID attribute
* draft-ietf-idr-bgp-prefix-sid-05
*/
-bgp_attr_parse_ret_t bgp_attr_prefix_sid(struct bgp_attr_parser_args *args)
+enum bgp_attr_parse_ret bgp_attr_prefix_sid(struct bgp_attr_parser_args *args)
{
struct peer *const peer = args->peer;
struct attr *const attr = args->attr;
- bgp_attr_parse_ret_t ret;
+ enum bgp_attr_parse_ret ret;
attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_PREFIX_SID);
@@ -2988,7 +2978,7 @@ bgp_attr_parse_ret_t bgp_attr_prefix_sid(struct bgp_attr_parser_args *args)
/* PMSI tunnel attribute (RFC 6514)
* Basic validation checks done here.
*/
-static bgp_attr_parse_ret_t
+static enum bgp_attr_parse_ret
bgp_attr_pmsi_tunnel(struct bgp_attr_parser_args *args)
{
struct peer *const peer = args->peer;
@@ -3036,7 +3026,8 @@ bgp_attr_pmsi_tunnel(struct bgp_attr_parser_args *args)
}
/* BGP unknown attribute treatment. */
-static bgp_attr_parse_ret_t bgp_attr_unknown(struct bgp_attr_parser_args *args)
+static enum bgp_attr_parse_ret
+bgp_attr_unknown(struct bgp_attr_parser_args *args)
{
bgp_size_t total = args->total;
struct transit *transit;
@@ -3141,11 +3132,12 @@ static int bgp_attr_check(struct peer *peer, struct attr *attr)
/* Read attribute of update packet. This function is called from
bgp_update_receive() in bgp_packet.c. */
-bgp_attr_parse_ret_t bgp_attr_parse(struct peer *peer, struct attr *attr,
- bgp_size_t size, struct bgp_nlri *mp_update,
- struct bgp_nlri *mp_withdraw)
+enum bgp_attr_parse_ret bgp_attr_parse(struct peer *peer, struct attr *attr,
+ bgp_size_t size,
+ struct bgp_nlri *mp_update,
+ struct bgp_nlri *mp_withdraw)
{
- bgp_attr_parse_ret_t ret;
+ enum bgp_attr_parse_ret ret;
uint8_t flag = 0;
uint8_t type = 0;
bgp_size_t length;
diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h
index 1f199da161..ac5734ede6 100644
--- a/bgpd/bgp_attr.h
+++ b/bgpd/bgp_attr.h
@@ -370,25 +370,25 @@ struct transit {
? bgp_attr_get_cluster((attr))->length \
: 0)
-typedef enum {
+enum bgp_attr_parse_ret {
BGP_ATTR_PARSE_PROCEED = 0,
BGP_ATTR_PARSE_ERROR = -1,
BGP_ATTR_PARSE_WITHDRAW = -2,
/* only used internally, send notify + convert to BGP_ATTR_PARSE_ERROR
- */
+ */
BGP_ATTR_PARSE_ERROR_NOTIFYPLS = -3,
BGP_ATTR_PARSE_EOR = -4,
-} bgp_attr_parse_ret_t;
+};
struct bpacket_attr_vec_arr;
/* Prototypes. */
extern void bgp_attr_init(void);
extern void bgp_attr_finish(void);
-extern bgp_attr_parse_ret_t bgp_attr_parse(struct peer *, struct attr *,
- bgp_size_t, struct bgp_nlri *,
- struct bgp_nlri *);
+extern enum bgp_attr_parse_ret bgp_attr_parse(struct peer *, struct attr *,
+ bgp_size_t, struct bgp_nlri *,
+ struct bgp_nlri *);
extern struct attr *bgp_attr_intern(struct attr *attr);
extern void bgp_attr_unintern_sub(struct attr *);
extern void bgp_attr_unintern(struct attr **);
@@ -432,7 +432,7 @@ extern int bgp_mp_reach_parse(struct bgp_attr_parser_args *args,
struct bgp_nlri *);
extern int bgp_mp_unreach_parse(struct bgp_attr_parser_args *args,
struct bgp_nlri *);
-extern bgp_attr_parse_ret_t
+extern enum bgp_attr_parse_ret
bgp_attr_prefix_sid(struct bgp_attr_parser_args *args);
extern struct bgp_attr_encap_subtlv *
@@ -471,8 +471,8 @@ extern void bgp_packet_mpunreach_prefix(
bool addpath_capable, uint32_t addpath_tx_id, struct attr *attr);
extern void bgp_packet_mpunreach_end(struct stream *s, size_t attrlen_pnt);
-extern bgp_attr_parse_ret_t bgp_attr_nexthop_valid(struct peer *peer,
- struct attr *attr);
+extern enum bgp_attr_parse_ret bgp_attr_nexthop_valid(struct peer *peer,
+ struct attr *attr);
static inline int bgp_rmap_nhop_changed(uint32_t out_rmap_flags,
uint32_t in_rmap_flags)
@@ -516,6 +516,11 @@ static inline void bgp_attr_set_ecommunity(struct attr *attr,
struct ecommunity *ecomm)
{
attr->ecommunity = ecomm;
+
+ if (ecomm)
+ SET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES));
+ else
+ UNSET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES));
}
static inline struct lcommunity *
@@ -528,6 +533,12 @@ static inline void bgp_attr_set_lcommunity(struct attr *attr,
struct lcommunity *lcomm)
{
attr->lcommunity = lcomm;
+
+ if (lcomm)
+ SET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_LARGE_COMMUNITIES));
+ else
+ UNSET_FLAG(attr->flag,
+ ATTR_FLAG_BIT(BGP_ATTR_LARGE_COMMUNITIES));
}
static inline struct community *bgp_attr_get_community(const struct attr *attr)
@@ -539,6 +550,11 @@ static inline void bgp_attr_set_community(struct attr *attr,
struct community *comm)
{
attr->community = comm;
+
+ if (comm)
+ SET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_COMMUNITIES));
+ else
+ UNSET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_COMMUNITIES));
}
static inline struct ecommunity *
@@ -551,6 +567,13 @@ static inline void bgp_attr_set_ipv6_ecommunity(struct attr *attr,
struct ecommunity *ipv6_ecomm)
{
attr->ipv6_ecommunity = ipv6_ecomm;
+
+ if (ipv6_ecomm)
+ SET_FLAG(attr->flag,
+ ATTR_FLAG_BIT(BGP_ATTR_IPV6_EXT_COMMUNITIES));
+ else
+ UNSET_FLAG(attr->flag,
+ ATTR_FLAG_BIT(BGP_ATTR_IPV6_EXT_COMMUNITIES));
}
static inline struct transit *bgp_attr_get_transit(const struct attr *attr)
diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c
index 9f3f8389ad..3224c1a2b0 100644
--- a/bgpd/bgp_evpn.c
+++ b/bgpd/bgp_evpn.c
@@ -759,8 +759,6 @@ static void build_evpn_type5_route_extcomm(struct bgp *bgp_vrf,
ecommunity_add_val(bgp_attr_get_ecommunity(attr), &eval_rmac,
true, true);
}
-
- attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES);
}
/*
@@ -870,8 +868,6 @@ static void build_evpn_route_extcomm(struct bgpevpn *vpn, struct attr *attr,
attr, ecommunity_merge(bgp_attr_get_ecommunity(attr),
&ecom_na));
}
-
- attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES);
}
/*
diff --git a/bgpd/bgp_evpn_mh.c b/bgpd/bgp_evpn_mh.c
index f0350e8524..e82fef8c1a 100644
--- a/bgpd/bgp_evpn_mh.c
+++ b/bgpd/bgp_evpn_mh.c
@@ -622,8 +622,6 @@ static void bgp_evpn_type4_route_extcomm_build(struct bgp_evpn_es *es,
bgp_attr_set_ecommunity(
attr,
ecommunity_merge(bgp_attr_get_ecommunity(attr), &ecom_df));
-
- attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES);
}
/* Create or update local type-4 route */
@@ -904,8 +902,6 @@ bgp_evpn_type1_es_route_extcomm_build(struct bgp_evpn_es_frag *es_frag,
ecom));
}
}
-
- attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES);
}
/* Extended communities associated with EAD-per-EVI */
@@ -932,8 +928,6 @@ static void bgp_evpn_type1_evi_route_extcomm_build(struct bgp_evpn_es *es,
bgp_attr_set_ecommunity(
attr,
ecommunity_merge(bgp_attr_get_ecommunity(attr), ecom));
-
- attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES);
}
/* Update EVPN EAD (type-1) route -
diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c
index 5f519e84ed..57e96696d8 100644
--- a/bgpd/bgp_evpn_vty.c
+++ b/bgpd/bgp_evpn_vty.c
@@ -3867,19 +3867,19 @@ DEFUN (bgp_evpn_advertise_type5,
if (!(afi == AFI_IP || afi == AFI_IP6)) {
vty_out(vty,
- "%%only ipv4 or ipv6 address families are supported\n");
+ "%% Only ipv4 or ipv6 address families are supported\n");
return CMD_WARNING;
}
if (safi != SAFI_UNICAST) {
vty_out(vty,
- "%%only ipv4 unicast or ipv6 unicast are supported\n");
+ "%% Only ipv4 unicast or ipv6 unicast are supported\n");
return CMD_WARNING;
}
if ((oly != OVERLAY_INDEX_TYPE_NONE)
&& (oly != OVERLAY_INDEX_GATEWAY_IP)) {
- vty_out(vty, "%%Unknown overlay-index type specified\n");
+ vty_out(vty, "%% Unknown overlay-index type specified\n");
return CMD_WARNING;
}
@@ -4058,13 +4058,13 @@ DEFUN (no_bgp_evpn_advertise_type5,
if (!(afi == AFI_IP || afi == AFI_IP6)) {
vty_out(vty,
- "%%only ipv4 or ipv6 address families are supported\n");
+ "%% Only ipv4 or ipv6 address families are supported\n");
return CMD_WARNING;
}
if (safi != SAFI_UNICAST) {
vty_out(vty,
- "%%only ipv4 unicast or ipv6 unicast are supported\n");
+ "%% Only ipv4 unicast or ipv6 unicast are supported\n");
return CMD_WARNING;
}
@@ -4495,7 +4495,7 @@ DEFPY(show_bgp_l2vpn_evpn_es,
if (esi_str) {
if (!str_to_esi(esi_str, &esi)) {
- vty_out(vty, "%%Malformed ESI\n");
+ vty_out(vty, "%% Malformed ESI\n");
return CMD_WARNING;
}
bgp_evpn_es_show_esi(vty, &esi, uj);
@@ -4517,7 +4517,7 @@ DEFPY(show_bgp_l2vpn_evpn_es_vrf, show_bgp_l2vpn_evpn_es_vrf_cmd,
if (esi_str) {
if (!str_to_esi(esi_str, &esi)) {
- vty_out(vty, "%%Malformed ESI\n");
+ vty_out(vty, "%% Malformed ESI\n");
return CMD_WARNING;
}
bgp_evpn_es_vrf_show_esi(vty, &esi, uj);
@@ -5132,7 +5132,7 @@ DEFPY_HIDDEN(
if (esi_str) {
if (!str_to_esi(esi_str, &esi)) {
- vty_out(vty, "%%Malformed ESI\n");
+ vty_out(vty, "%% Malformed ESI\n");
return CMD_WARNING;
}
esi_p = &esi;
@@ -5165,7 +5165,7 @@ DEFPY_HIDDEN(
if (esi_str) {
if (!str_to_esi(esi_str, &esi)) {
- vty_out(vty, "%%Malformed ESI\n");
+ vty_out(vty, "%% Malformed ESI\n");
return CMD_WARNING;
}
esi_p = &esi;
@@ -5267,19 +5267,19 @@ DEFPY_HIDDEN(test_es_add,
bgp = bgp_get_evpn();
if (!bgp) {
- vty_out(vty, "%%EVPN BGP instance not yet created\n");
+ vty_out(vty, "%% EVPN BGP instance not yet created\n");
return CMD_WARNING;
}
if (!str_to_esi(esi_str, &esi)) {
- vty_out(vty, "%%Malformed ESI\n");
+ vty_out(vty, "%% Malformed ESI\n");
return CMD_WARNING;
}
if (no) {
ret = bgp_evpn_local_es_del(bgp, &esi);
if (ret == -1) {
- vty_out(vty, "%%Failed to delete ES\n");
+ vty_out(vty, "%% Failed to delete ES\n");
return CMD_WARNING;
}
} else {
@@ -5292,7 +5292,7 @@ DEFPY_HIDDEN(test_es_add,
ret = bgp_evpn_local_es_add(bgp, &esi, vtep_ip, oper_up,
EVPN_MH_DF_PREF_MIN, false);
if (ret == -1) {
- vty_out(vty, "%%Failed to add ES\n");
+ vty_out(vty, "%% Failed to add ES\n");
return CMD_WARNING;
}
}
@@ -5316,25 +5316,25 @@ DEFPY_HIDDEN(test_es_vni_add,
bgp = bgp_get_evpn();
if (!bgp) {
- vty_out(vty, "%%EVPN BGP instance not yet created\n");
+ vty_out(vty, "%% EVPN BGP instance not yet created\n");
return CMD_WARNING;
}
if (!str_to_esi(esi_str, &esi)) {
- vty_out(vty, "%%Malformed ESI\n");
+ vty_out(vty, "%% Malformed ESI\n");
return CMD_WARNING;
}
if (no) {
ret = bgp_evpn_local_es_evi_del(bgp, &esi, vni);
if (ret == -1) {
- vty_out(vty, "%%Failed to deref ES VNI\n");
+ vty_out(vty, "%% Failed to deref ES VNI\n");
return CMD_WARNING;
}
} else {
ret = bgp_evpn_local_es_evi_add(bgp, &esi, vni);
if (ret == -1) {
- vty_out(vty, "%%Failed to ref ES VNI\n");
+ vty_out(vty, "%% Failed to ref ES VNI\n");
return CMD_WARNING;
}
}
diff --git a/bgpd/bgp_mpath.c b/bgpd/bgp_mpath.c
index 6e695d0301..6cd6ddd9dd 100644
--- a/bgpd/bgp_mpath.c
+++ b/bgpd/bgp_mpath.c
@@ -905,18 +905,12 @@ void bgp_path_info_mpath_aggregate_update(struct bgp_path_info *new_best,
attr.aspath = aspath;
attr.origin = origin;
- if (community) {
+ if (community)
bgp_attr_set_community(&attr, community);
- attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_COMMUNITIES);
- }
- if (ecomm) {
+ if (ecomm)
bgp_attr_set_ecommunity(&attr, ecomm);
- attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES);
- }
- if (lcomm) {
+ if (lcomm)
bgp_attr_set_lcommunity(&attr, lcomm);
- attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_LARGE_COMMUNITIES);
- }
/* Zap multipath attr nexthop so we set nexthop to self */
attr.nexthop.s_addr = INADDR_ANY;
diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c
index 08a68d0c12..0074d5daac 100644
--- a/bgpd/bgp_mplsvpn.c
+++ b/bgpd/bgp_mplsvpn.c
@@ -1147,7 +1147,6 @@ void vpn_leak_from_vrf_update(struct bgp *bgp_vpn, /* to */
.rtlist[BGP_VPN_POLICY_DIR_TOVPN]);
}
bgp_attr_set_ecommunity(&static_attr, new_ecom);
- SET_FLAG(static_attr.flag, ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES));
if (debug && bgp_attr_get_ecommunity(&static_attr)) {
char *s = ecommunity_ecom2str(
@@ -1511,8 +1510,6 @@ vpn_leak_to_vrf_update_onevrf(struct bgp *bgp_vrf, /* to */
bgp_attr_set_ecommunity(&static_attr, new_ecom);
if (new_ecom->size == 0) {
- UNSET_FLAG(static_attr.flag,
- ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES));
ecommunity_free(&new_ecom);
bgp_attr_set_ecommunity(&static_attr, NULL);
}
@@ -1924,7 +1921,7 @@ void vpn_handle_router_id_update(struct bgp *bgp, bool withdraw,
struct bgp *bgp_import;
struct listnode *node;
struct ecommunity *ecom;
- vpn_policy_direction_t idir, edir;
+ enum vpn_policy_direction idir, edir;
/*
* Router-id change that is not explicitly configured
@@ -2037,7 +2034,7 @@ void vrf_import_from_vrf(struct bgp *to_bgp, struct bgp *from_bgp,
afi_t afi, safi_t safi)
{
const char *export_name;
- vpn_policy_direction_t idir, edir;
+ enum vpn_policy_direction idir, edir;
char *vname, *tmp_name;
char buf[RD_ADDRSTRLEN];
struct ecommunity *ecom;
@@ -2166,7 +2163,7 @@ void vrf_unimport_from_vrf(struct bgp *to_bgp, struct bgp *from_bgp,
afi_t afi, safi_t safi)
{
const char *export_name, *tmp_name;
- vpn_policy_direction_t idir, edir;
+ enum vpn_policy_direction idir, edir;
char *vname;
struct ecommunity *ecom = NULL;
struct listnode *node;
@@ -3089,7 +3086,7 @@ void bgp_vpn_leak_export(struct bgp *from_bgp)
char *vname;
struct listnode *node, *next;
struct ecommunity *ecom;
- vpn_policy_direction_t idir, edir;
+ enum vpn_policy_direction idir, edir;
safi_t safi = SAFI_UNICAST;
struct bgp *to_bgp;
int debug;
diff --git a/bgpd/bgp_mplsvpn.h b/bgpd/bgp_mplsvpn.h
index 5bf772fefe..8c2eae279c 100644
--- a/bgpd/bgp_mplsvpn.h
+++ b/bgpd/bgp_mplsvpn.h
@@ -205,7 +205,7 @@ static inline int vpn_leak_from_vpn_active(struct bgp *bgp_vrf, afi_t afi,
return 1;
}
-static inline void vpn_leak_prechange(vpn_policy_direction_t direction,
+static inline void vpn_leak_prechange(enum vpn_policy_direction direction,
afi_t afi, struct bgp *bgp_vpn,
struct bgp *bgp_vrf)
{
@@ -225,7 +225,7 @@ static inline void vpn_leak_prechange(vpn_policy_direction_t direction,
}
}
-static inline void vpn_leak_postchange(vpn_policy_direction_t direction,
+static inline void vpn_leak_postchange(enum vpn_policy_direction direction,
afi_t afi, struct bgp *bgp_vpn,
struct bgp *bgp_vrf)
{
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index 8b8fcf58c0..b0d852ee63 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -1679,7 +1679,7 @@ static int bgp_update_receive(struct peer *peer, bgp_size_t size)
*
* Complicates the flow a little though..
*/
- bgp_attr_parse_ret_t attr_parse_ret = BGP_ATTR_PARSE_PROCEED;
+ enum bgp_attr_parse_ret attr_parse_ret = BGP_ATTR_PARSE_PROCEED;
/* This define morphs the update case into a withdraw when lower levels
* have signalled an error condition where this is best.
*/
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index a5a57bdc7f..abf14778d7 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -565,8 +565,8 @@ static int bgp_path_info_cmp(struct bgp *bgp, struct bgp_path_info *new,
{
const struct prefix *new_p;
struct attr *newattr, *existattr;
- bgp_peer_sort_t new_sort;
- bgp_peer_sort_t exist_sort;
+ enum bgp_peer_sort new_sort;
+ enum bgp_peer_sort exist_sort;
uint32_t new_pref;
uint32_t exist_pref;
uint32_t new_med;
@@ -1769,7 +1769,6 @@ void bgp_attr_add_llgr_community(struct attr *attr)
community_free(&llgr);
bgp_attr_set_community(attr, new);
- attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_COMMUNITIES);
}
void bgp_attr_add_gshut_community(struct attr *attr)
@@ -1798,7 +1797,6 @@ void bgp_attr_add_gshut_community(struct attr *attr)
community_free(&gshut);
bgp_attr_set_community(attr, new);
- attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_COMMUNITIES);
/* When we add the graceful-shutdown community we must also
* lower the local-preference */
@@ -3711,7 +3709,6 @@ static void bgp_attr_add_no_export_community(struct attr *attr)
community_free(&no_export);
bgp_attr_set_community(attr, new);
- attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_COMMUNITIES);
}
int bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
@@ -8189,14 +8186,16 @@ DEFPY(aggregate_addressv4, aggregate_addressv4_cmd,
"[no] aggregate-address <A.B.C.D/M$prefix|A.B.C.D$addr A.B.C.D$mask> [{"
"as-set$as_set_s"
"|summary-only$summary_only"
- "|route-map WORD$rmap_name"
+ "|route-map RMAP_NAME$rmap_name"
"|origin <egp|igp|incomplete>$origin_s"
"|matching-MED-only$match_med"
- "|suppress-map WORD$suppress_map"
+ "|suppress-map RMAP_NAME$suppress_map"
"}]",
NO_STR
"Configure BGP aggregate entries\n"
- "Aggregate prefix\n" "Aggregate address\n" "Aggregate mask\n"
+ "Aggregate prefix\n"
+ "Aggregate address\n"
+ "Aggregate mask\n"
"Generate AS set path information\n"
"Filter more specific routes from updates\n"
"Apply route map to aggregate network\n"
@@ -8251,10 +8250,10 @@ DEFPY(aggregate_addressv6, aggregate_addressv6_cmd,
"[no] aggregate-address X:X::X:X/M$prefix [{"
"as-set$as_set_s"
"|summary-only$summary_only"
- "|route-map WORD$rmap_name"
+ "|route-map RMAP_NAME$rmap_name"
"|origin <egp|igp|incomplete>$origin_s"
"|matching-MED-only$match_med"
- "|suppress-map WORD$suppress_map"
+ "|suppress-map RMAP_NAME$suppress_map"
"}]",
NO_STR
"Configure BGP aggregate entries\n"
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index 2ed73ddb68..6ab753f476 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -2199,7 +2199,6 @@ route_set_community(void *rule, const struct prefix *prefix, void *object)
/* "none" case. */
if (rcs->none) {
- attr->flag &= ~(ATTR_FLAG_BIT(BGP_ATTR_COMMUNITIES));
bgp_attr_set_community(attr, NULL);
/* See the longer comment down below. */
if (old && old->refcnt == 0)
@@ -2227,8 +2226,6 @@ route_set_community(void *rule, const struct prefix *prefix, void *object)
/* will be interned by caller if required */
bgp_attr_set_community(attr, new);
- attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_COMMUNITIES);
-
return RMAP_OKAY;
}
@@ -2313,7 +2310,6 @@ route_set_lcommunity(void *rule, const struct prefix *prefix, void *object)
/* "none" case. */
if (rcs->none) {
- attr->flag &= ~(ATTR_FLAG_BIT(BGP_ATTR_LARGE_COMMUNITIES));
bgp_attr_set_lcommunity(attr, NULL);
/* See the longer comment down below. */
@@ -2341,8 +2337,6 @@ route_set_lcommunity(void *rule, const struct prefix *prefix, void *object)
/* will be intern()'d or attr_flush()'d by bgp_update_main() */
bgp_attr_set_lcommunity(attr, new);
- attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_LARGE_COMMUNITIES);
-
return RMAP_OKAY;
}
@@ -2438,13 +2432,9 @@ route_set_lcommunity_delete(void *rule, const struct prefix *pfx, void *object)
if (new->size == 0) {
bgp_attr_set_lcommunity(path->attr, NULL);
- path->attr->flag &=
- ~ATTR_FLAG_BIT(BGP_ATTR_LARGE_COMMUNITIES);
lcommunity_free(&new);
} else {
bgp_attr_set_lcommunity(path->attr, new);
- path->attr->flag |=
- ATTR_FLAG_BIT(BGP_ATTR_LARGE_COMMUNITIES);
}
}
@@ -2526,12 +2516,9 @@ route_set_community_delete(void *rule, const struct prefix *prefix,
if (new->size == 0) {
bgp_attr_set_community(path->attr, NULL);
- path->attr->flag &=
- ~ATTR_FLAG_BIT(BGP_ATTR_COMMUNITIES);
community_free(&new);
} else {
bgp_attr_set_community(path->attr, new);
- path->attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_COMMUNITIES);
}
}
@@ -2597,7 +2584,6 @@ route_set_ecommunity(void *rule, const struct prefix *prefix, void *object)
attr = path->attr;
if (rcs->none) {
- attr->flag &= ~(ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES));
bgp_attr_set_ecommunity(attr, NULL);
return RMAP_OKAY;
}
@@ -2624,8 +2610,6 @@ route_set_ecommunity(void *rule, const struct prefix *prefix, void *object)
/* will be intern()'d or attr_flush()'d by bgp_update_main() */
bgp_attr_set_ecommunity(path->attr, new_ecom);
- path->attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES);
-
return RMAP_OKAY;
}
@@ -2787,7 +2771,6 @@ route_set_ecommunity_lb(void *rule, const struct prefix *prefix, void *object)
/* new_ecom will be intern()'d or attr_flush()'d in call stack */
bgp_attr_set_ecommunity(path->attr, new_ecom);
- path->attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES);
/* Mark that route-map has set link bandwidth; used in attribute
* setting decisions.
diff --git a/bgpd/bgp_updgrp.c b/bgpd/bgp_updgrp.c
index aa3e44318a..e85118e588 100644
--- a/bgpd/bgp_updgrp.c
+++ b/bgpd/bgp_updgrp.c
@@ -1463,7 +1463,7 @@ static int update_group_periodic_merge_walkcb(struct update_group *updgrp,
* over multiple statements. Useful to set dirty flag on
* update groups.
*/
-void update_group_policy_update(struct bgp *bgp, bgp_policy_type_e ptype,
+void update_group_policy_update(struct bgp *bgp, enum bgp_policy_type ptype,
const char *pname, int route_update,
int start_event)
{
diff --git a/bgpd/bgp_updgrp.h b/bgpd/bgp_updgrp.h
index 0e10341bc4..e3309ab7c5 100644
--- a/bgpd/bgp_updgrp.h
+++ b/bgpd/bgp_updgrp.h
@@ -74,7 +74,7 @@
| PEER_CAP_ADDPATH_AF_TX_ADV | PEER_CAP_ADDPATH_AF_RX_RCV \
| PEER_CAP_ENHE_AF_NEGO)
-typedef enum { BGP_ATTR_VEC_NH = 0, BGP_ATTR_VEC_MAX } bpacket_attr_vec_type;
+enum bpacket_attr_vec_type { BGP_ATTR_VEC_NH = 0, BGP_ATTR_VEC_MAX };
typedef struct {
uint32_t flags;
@@ -288,7 +288,7 @@ struct updwalk_context {
struct bgp_path_info *pi;
uint64_t updgrp_id;
uint64_t subgrp_id;
- bgp_policy_type_e policy_type;
+ enum bgp_policy_type policy_type;
const char *policy_name;
int policy_event_start_flag;
int policy_route_update;
@@ -368,7 +368,8 @@ extern void update_subgroup_split_peer(struct peer_af *, struct update_group *);
extern bool update_subgroup_check_merge(struct update_subgroup *, const char *);
extern bool update_subgroup_trigger_merge_check(struct update_subgroup *,
int force);
-extern void update_group_policy_update(struct bgp *bgp, bgp_policy_type_e ptype,
+extern void update_group_policy_update(struct bgp *bgp,
+ enum bgp_policy_type ptype,
const char *pname, int route_update,
int start_event);
extern void update_group_af_walk(struct bgp *bgp, afi_t afi, safi_t safi,
@@ -409,7 +410,7 @@ extern struct stream *bpacket_reformat_for_peer(struct bpacket *pkt,
struct peer_af *paf);
extern void bpacket_attr_vec_arr_reset(struct bpacket_attr_vec_arr *vecarr);
extern void bpacket_attr_vec_arr_set_vec(struct bpacket_attr_vec_arr *vecarr,
- bpacket_attr_vec_type type,
+ enum bpacket_attr_vec_type type,
struct stream *s, struct attr *attr);
extern void subgroup_default_update_packet(struct update_subgroup *subgrp,
struct attr *attr,
diff --git a/bgpd/bgp_updgrp_adv.c b/bgpd/bgp_updgrp_adv.c
index 0d8ee79ae5..87558f9c35 100644
--- a/bgpd/bgp_updgrp_adv.c
+++ b/bgpd/bgp_updgrp_adv.c
@@ -818,6 +818,8 @@ void subgroup_default_originate(struct update_subgroup *subgrp, int withdraw)
assert(attr.aspath);
attr.local_pref = bgp->default_local_pref;
+ attr.med = 0;
+ attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_MULTI_EXIT_DISC);
if ((afi == AFI_IP6) || peer_cap_enhe(peer, afi, safi)) {
/* IPv6 global nexthop must be included. */
diff --git a/bgpd/bgp_updgrp_packet.c b/bgpd/bgp_updgrp_packet.c
index cf24e1d689..c4a3ca7500 100644
--- a/bgpd/bgp_updgrp_packet.c
+++ b/bgpd/bgp_updgrp_packet.c
@@ -1240,7 +1240,7 @@ void subgroup_default_withdraw_packet(struct update_subgroup *subgrp)
static void
bpacket_vec_arr_inherit_attr_flags(struct bpacket_attr_vec_arr *vecarr,
- bpacket_attr_vec_type type,
+ enum bpacket_attr_vec_type type,
struct attr *attr)
{
if (CHECK_FLAG(attr->rmap_change_flags,
@@ -1291,8 +1291,8 @@ void bpacket_attr_vec_arr_reset(struct bpacket_attr_vec_arr *vecarr)
/* Setup a particular node entry in the vecarr */
void bpacket_attr_vec_arr_set_vec(struct bpacket_attr_vec_arr *vecarr,
- bpacket_attr_vec_type type, struct stream *s,
- struct attr *attr)
+ enum bpacket_attr_vec_type type,
+ struct stream *s, struct attr *attr)
{
if (!vecarr)
return;
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 7bed1d3f50..2aa77576a1 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -934,12 +934,12 @@ static void bgp_clear_vty_error(struct vty *vty, struct peer *peer, afi_t afi,
switch (error) {
case BGP_ERR_AF_UNCONFIGURED:
vty_out(vty,
- "%%BGP: Enable %s address family for the neighbor %s\n",
+ "%% BGP: Enable %s address family for the neighbor %s\n",
get_afi_safi_str(afi, safi, false), peer->host);
break;
case BGP_ERR_SOFT_RECONFIG_UNCONFIGURED:
vty_out(vty,
- "%%BGP: Inbound soft reconfig for %s not possible as it\n has neither refresh capability, nor inbound soft reconfig\n",
+ "%% BGP: Inbound soft reconfig for %s not possible as it\n has neither refresh capability, nor inbound soft reconfig\n",
peer->host);
break;
default:
@@ -1086,7 +1086,7 @@ static int bgp_clear(struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi,
peer = peer_lookup(bgp, &su);
if (!peer) {
vty_out(vty,
- "%%BGP: Unknown neighbor - \"%s\"\n",
+ "%% BGP: Unknown neighbor - \"%s\"\n",
arg);
return CMD_WARNING;
}
@@ -1113,7 +1113,7 @@ static int bgp_clear(struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi,
group = peer_group_lookup(bgp, arg);
if (!group) {
- vty_out(vty, "%%BGP: No such peer-group %s\n", arg);
+ vty_out(vty, "%% BGP: No such peer-group %s\n", arg);
return CMD_WARNING;
}
@@ -1128,7 +1128,7 @@ static int bgp_clear(struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi,
if (!found)
vty_out(vty,
- "%%BGP: No %s peer belonging to peer-group %s is configured\n",
+ "%% BGP: No %s peer belonging to peer-group %s is configured\n",
get_afi_safi_str(afi, safi, false), arg);
return CMD_SUCCESS;
@@ -1163,7 +1163,7 @@ static int bgp_clear(struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi,
if (!found)
vty_out(vty,
- "%%BGP: No external %s peer is configured\n",
+ "%% BGP: No external %s peer is configured\n",
get_afi_safi_str(afi, safi, false));
return CMD_SUCCESS;
@@ -1200,7 +1200,7 @@ static int bgp_clear(struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi,
if (!found)
vty_out(vty,
- "%%BGP: No %s peer is configured with AS %s\n",
+ "%% BGP: No %s peer is configured with AS %s\n",
get_afi_safi_str(afi, safi, false), arg);
return CMD_SUCCESS;
@@ -8700,7 +8700,7 @@ DEFPY (af_rt_vpn_imexport,
int ret;
struct ecommunity *ecom = NULL;
int dodir[BGP_VPN_POLICY_DIR_MAX] = {0};
- vpn_policy_direction_t dir;
+ enum vpn_policy_direction dir;
afi_t afi;
int idx = 0;
bool yes = true;
@@ -8780,7 +8780,7 @@ DEFPY (af_route_map_vpn_imexport,
VTY_DECLVAR_CONTEXT(bgp, bgp);
int ret;
int dodir[BGP_VPN_POLICY_DIR_MAX] = {0};
- vpn_policy_direction_t dir;
+ enum vpn_policy_direction dir;
afi_t afi;
int idx = 0;
bool yes = true;
@@ -8843,7 +8843,7 @@ DEFPY(af_import_vrf_route_map, af_import_vrf_route_map_cmd,
"name of route-map\n")
{
VTY_DECLVAR_CONTEXT(bgp, bgp);
- vpn_policy_direction_t dir = BGP_VPN_POLICY_DIR_FROMVPN;
+ enum vpn_policy_direction dir = BGP_VPN_POLICY_DIR_FROMVPN;
afi_t afi;
struct bgp *bgp_default;
@@ -8896,7 +8896,7 @@ DEFPY(af_no_import_vrf_route_map, af_no_import_vrf_route_map_cmd,
"name of route-map\n")
{
VTY_DECLVAR_CONTEXT(bgp, bgp);
- vpn_policy_direction_t dir = BGP_VPN_POLICY_DIR_FROMVPN;
+ enum vpn_policy_direction dir = BGP_VPN_POLICY_DIR_FROMVPN;
afi_t afi;
afi = vpn_policy_getafi(vty, bgp, true);
@@ -9027,7 +9027,7 @@ DEFPY (bgp_imexport_vpn,
int idx = 0;
bool yes = true;
int flag;
- vpn_policy_direction_t dir;
+ enum vpn_policy_direction dir;
if (argv_find(argv, argc, "no", &idx))
yes = false;
@@ -14626,7 +14626,7 @@ static int bgp_show_route_leak_vty(struct vty *vty, const char *name,
char *vname;
char buf1[INET6_ADDRSTRLEN];
char *ecom_str;
- vpn_policy_direction_t dir;
+ enum vpn_policy_direction dir;
if (json) {
json_object *json_import_vrfs = NULL;
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 6f06ad5a40..e24c816794 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -565,7 +565,7 @@ void bgp_confederation_id_set(struct bgp *bgp, as_t as)
AS change. Just Reset EBGP sessions, not CONFED sessions. If we
were not doing confederation before, reset all EBGP sessions. */
for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) {
- bgp_peer_sort_t ptype = peer_sort(peer);
+ enum bgp_peer_sort ptype = peer_sort(peer);
/* We're looking for peers who's AS is not local or part of our
confederation. */
@@ -1004,7 +1004,7 @@ void peer_af_flag_inherit(struct peer *peer, afi_t afi, safi_t safi,
}
/* Check peer's AS number and determines if this peer is IBGP or EBGP */
-static inline bgp_peer_sort_t peer_calc_sort(struct peer *peer)
+static inline enum bgp_peer_sort peer_calc_sort(struct peer *peer)
{
struct bgp *bgp;
@@ -1091,13 +1091,13 @@ static inline bgp_peer_sort_t peer_calc_sort(struct peer *peer)
}
/* Calculate and cache the peer "sort" */
-bgp_peer_sort_t peer_sort(struct peer *peer)
+enum bgp_peer_sort peer_sort(struct peer *peer)
{
peer->sort = peer_calc_sort(peer);
return peer->sort;
}
-bgp_peer_sort_t peer_sort_lookup(struct peer *peer)
+enum bgp_peer_sort peer_sort_lookup(struct peer *peer)
{
return peer->sort;
}
@@ -1826,7 +1826,7 @@ int bgp_afi_safi_peer_exists(struct bgp *bgp, afi_t afi, safi_t safi)
/* Change peer's AS number. */
void peer_as_change(struct peer *peer, as_t as, int as_specified)
{
- bgp_peer_sort_t origtype, newtype;
+ enum bgp_peer_sort origtype, newtype;
/* Stop peer. */
if (!CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP)) {
@@ -1931,8 +1931,8 @@ int peer_remote_as(struct bgp *bgp, union sockunion *su, const char *conf_if,
return BGP_ERR_PEER_GROUP_MEMBER;
}
- bgp_peer_sort_t peer_sort_type =
- peer_sort(peer->group->conf);
+ enum bgp_peer_sort peer_sort_type =
+ peer_sort(peer->group->conf);
/* Explicit AS numbers used, compare AS numbers */
if (as_type == AS_SPECIFIED) {
@@ -2898,7 +2898,7 @@ int peer_group_bind(struct bgp *bgp, union sockunion *su, struct peer *peer,
int first_member = 0;
afi_t afi;
safi_t safi;
- bgp_peer_sort_t ptype, gtype;
+ enum bgp_peer_sort ptype, gtype;
/* Lookup the peer. */
if (!peer)
@@ -3766,7 +3766,7 @@ void bgp_free(struct bgp *bgp)
XFREE(MTYPE_BGP_EVPN_INFO, bgp->evpn_info);
for (afi = AFI_IP; afi < AFI_MAX; afi++) {
- vpn_policy_direction_t dir;
+ enum vpn_policy_direction dir;
if (bgp->vpn_policy[afi].import_vrf)
list_delete(&bgp->vpn_policy[afi].import_vrf);
@@ -4542,7 +4542,7 @@ static int peer_af_flag_modify(struct peer *peer, afi_t afi, safi_t safi,
struct peer *member;
struct listnode *node, *nnode;
struct peer_flag_action action;
- bgp_peer_sort_t ptype;
+ enum bgp_peer_sort ptype;
memset(&action, 0, sizeof(struct peer_flag_action));
size = sizeof(peer_af_flag_action_list)
@@ -5909,7 +5909,7 @@ int peer_local_as_set(struct peer *peer, as_t as, bool no_prepend,
struct bgp *bgp = peer->bgp;
struct peer *member;
struct listnode *node, *nnode;
- bgp_peer_sort_t ptype = peer_sort(peer);
+ enum bgp_peer_sort ptype = peer_sort(peer);
if (ptype != BGP_PEER_EBGP && ptype != BGP_PEER_INTERNAL)
return BGP_ERR_LOCAL_AS_ALLOWED_ONLY_FOR_EBGP;
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index 360bcc39c4..dfed9f2ae9 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -192,11 +192,11 @@ struct bgp_redist {
struct bgp_rmap rmap;
};
-typedef enum {
+enum vpn_policy_direction {
BGP_VPN_POLICY_DIR_FROMVPN = 0,
BGP_VPN_POLICY_DIR_TOVPN = 1,
BGP_VPN_POLICY_DIR_MAX = 2
-} vpn_policy_direction_t;
+};
struct vpn_policy {
struct bgp *bgp; /* parent */
@@ -901,13 +901,13 @@ struct bgp_filter {
/* IBGP/EBGP identifier. We also have a CONFED peer, which is to say,
a peer who's AS is part of our Confederation. */
-typedef enum {
+enum bgp_peer_sort {
BGP_PEER_UNSPECIFIED,
BGP_PEER_IBGP,
BGP_PEER_EBGP,
BGP_PEER_INTERNAL,
BGP_PEER_CONFED,
-} bgp_peer_sort_t;
+};
/* BGP message header and packet size. */
#define BGP_MARKER_SIZE 16
@@ -1084,7 +1084,7 @@ struct peer {
/* Peer's local AS number. */
as_t local_as;
- bgp_peer_sort_t sort;
+ enum bgp_peer_sort sort;
/* Peer's Change local AS number. */
as_t change_local_as;
@@ -1968,12 +1968,12 @@ enum bgp_create_error_code {
/*
* Enumeration of different policy kinds a peer can be configured with.
*/
-typedef enum {
+enum bgp_policy_type {
BGP_POLICY_ROUTE_MAP,
BGP_POLICY_FILTER_LIST,
BGP_POLICY_PREFIX_LIST,
BGP_POLICY_DISTRIBUTE_LIST,
-} bgp_policy_type_e;
+};
/* peer_flag_change_type. */
enum peer_change_type {
@@ -2025,8 +2025,8 @@ extern struct peer *peer_unlock_with_caller(const char *, struct peer *);
#define peer_unlock(A) peer_unlock_with_caller(__FUNCTION__, (A))
#define peer_lock(B) peer_lock_with_caller(__FUNCTION__, (B))
-extern bgp_peer_sort_t peer_sort(struct peer *peer);
-extern bgp_peer_sort_t peer_sort_lookup(struct peer *peer);
+extern enum bgp_peer_sort peer_sort(struct peer *peer);
+extern enum bgp_peer_sort peer_sort_lookup(struct peer *peer);
extern bool peer_active(struct peer *);
extern bool peer_active_nego(struct peer *);
diff --git a/bgpd/rfapi/rfapi.c b/bgpd/rfapi/rfapi.c
index c96c321d76..3aa8868374 100644
--- a/bgpd/rfapi/rfapi.c
+++ b/bgpd/rfapi/rfapi.c
@@ -832,9 +832,7 @@ void add_vnc_route(struct rfapi_descriptor *rfd, /* cookie, VPN UN addr, peer */
struct ecommunity *ecomm = bgp_attr_get_ecommunity(&attr);
- if (ecomm->size) {
- attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES);
- } else {
+ if (!ecomm->size) {
ecommunity_free(&ecomm);
bgp_attr_set_ecommunity(&attr, NULL);
}
diff --git a/bgpd/rfapi/vnc_export_bgp.c b/bgpd/rfapi/vnc_export_bgp.c
index f4f2e11391..c479b4d65a 100644
--- a/bgpd/rfapi/vnc_export_bgp.c
+++ b/bgpd/rfapi/vnc_export_bgp.c
@@ -650,9 +650,6 @@ encap_attr_export(struct attr *new, struct attr *orig,
} else {
bgp_attr_set_ecommunity(new, ecom_ro);
}
- if (ecom_ro) {
- new->flag |= ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES);
- }
/*
* Set MED
diff --git a/doc/user/pimv6.rst b/doc/user/pimv6.rst
index e71cf4631c..f0946a13f7 100644
--- a/doc/user/pimv6.rst
+++ b/doc/user/pimv6.rst
@@ -113,6 +113,14 @@ Certain signals have special meanings to *pim6d*.
notifications to the kernel. This command is vrf aware, to configure for a
vrf, enter the vrf submode.
+.. clicmd:: ipv6 ssmpingd [X:X::X:X]
+
+ Enable ipv6 ssmpingd configuration. A network level management tool
+ to check whether one can receive multicast packets via SSM from host.
+ The host target given to ssmping must run the ssmpingd daemon which listens
+ for IPv4 and IPv6 unicast requests. When it receives one, it responds to a
+ well known SSM multicast group which ssmping just have joined.
+
.. _pimv6-interface-configuration:
PIMv6 Interface Configuration
diff --git a/pimd/pim6_cmd.c b/pimd/pim6_cmd.c
index 5d7a63372f..90840a95e0 100644
--- a/pimd/pim6_cmd.c
+++ b/pimd/pim6_cmd.c
@@ -451,6 +451,33 @@ DEFPY (no_ipv6_pim_rp_prefix_list,
return pim_process_no_rp_plist_cmd(vty, rp_str, plist);
}
+
+DEFPY (ipv6_ssmpingd,
+ ipv6_ssmpingd_cmd,
+ "ipv6 ssmpingd [X:X::X:X]$source",
+ IPV6_STR
+ CONF_SSMPINGD_STR
+ "Source address\n")
+{
+ const char *src_str = (source_str) ? source_str : "::";
+
+ return pim_process_ssmpingd_cmd(vty, NB_OP_CREATE, src_str);
+}
+
+
+DEFPY (no_ipv6_ssmpingd,
+ no_ipv6_ssmpingd_cmd,
+ "no ipv6 ssmpingd [X:X::X:X]$source",
+ NO_STR
+ IPV6_STR
+ CONF_SSMPINGD_STR
+ "Source address\n")
+{
+ const char *src_str = (source_str) ? source_str : "::";
+
+ return pim_process_ssmpingd_cmd(vty, NB_OP_DESTROY, src_str);
+}
+
DEFPY (interface_ipv6_mld_join,
interface_ipv6_mld_join_cmd,
"ipv6 mld join X:X::X:X$group [X:X::X:X$source]",
@@ -1588,6 +1615,10 @@ void pim_cmd_init(void)
install_element(VRF_NODE, &ipv6_pim_rp_prefix_list_cmd);
install_element(CONFIG_NODE, &no_ipv6_pim_rp_prefix_list_cmd);
install_element(VRF_NODE, &no_ipv6_pim_rp_prefix_list_cmd);
+ install_element(CONFIG_NODE, &ipv6_ssmpingd_cmd);
+ install_element(VRF_NODE, &ipv6_ssmpingd_cmd);
+ install_element(CONFIG_NODE, &no_ipv6_ssmpingd_cmd);
+ install_element(VRF_NODE, &no_ipv6_ssmpingd_cmd);
install_element(INTERFACE_NODE, &interface_ipv6_mld_cmd);
install_element(INTERFACE_NODE, &interface_no_ipv6_mld_cmd);
install_element(INTERFACE_NODE, &interface_ipv6_mld_join_cmd);
diff --git a/pimd/pim6_cmd.h b/pimd/pim6_cmd.h
index ac5eb3f9bf..d6853a7410 100644
--- a/pimd/pim6_cmd.h
+++ b/pimd/pim6_cmd.h
@@ -43,6 +43,7 @@
#define DEBUG_MLD_EVENTS_STR "MLD protocol events\n"
#define DEBUG_MLD_PACKETS_STR "MLD protocol packets\n"
#define DEBUG_MLD_TRACE_STR "MLD internal daemon activity\n"
+#define CONF_SSMPINGD_STR "Enable ssmpingd operation\n"
void pim_cmd_init(void);
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index da4069abb3..8630f79b36 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -5314,24 +5314,9 @@ DEFUN (ip_ssmpingd,
"Source address\n")
{
int idx_ipv4 = 2;
- const char *source_str = (argc == 3) ? argv[idx_ipv4]->arg : "0.0.0.0";
- const char *vrfname;
- char ssmpingd_ip_xpath[XPATH_MAXLEN];
-
- vrfname = pim_cli_get_vrf_name(vty);
- if (vrfname == NULL)
- return CMD_WARNING_CONFIG_FAILED;
+ const char *src_str = (argc == 3) ? argv[idx_ipv4]->arg : "0.0.0.0";
- snprintf(ssmpingd_ip_xpath, sizeof(ssmpingd_ip_xpath),
- FRR_PIM_VRF_XPATH,
- "frr-pim:pimd", "pim", vrfname, "frr-routing:ipv4");
- strlcat(ssmpingd_ip_xpath, "/ssm-pingd-source-ip",
- sizeof(ssmpingd_ip_xpath));
-
- nb_cli_enqueue_change(vty, ssmpingd_ip_xpath, NB_OP_CREATE,
- source_str);
-
- return nb_cli_apply_changes(vty, NULL);
+ return pim_process_ssmpingd_cmd(vty, NB_OP_CREATE, src_str);
}
DEFUN (no_ip_ssmpingd,
@@ -5342,25 +5327,10 @@ DEFUN (no_ip_ssmpingd,
CONF_SSMPINGD_STR
"Source address\n")
{
- const char *vrfname;
int idx_ipv4 = 3;
- const char *source_str = (argc == 4) ? argv[idx_ipv4]->arg : "0.0.0.0";
- char ssmpingd_ip_xpath[XPATH_MAXLEN];
-
- vrfname = pim_cli_get_vrf_name(vty);
- if (vrfname == NULL)
- return CMD_WARNING_CONFIG_FAILED;
+ const char *src_str = (argc == 4) ? argv[idx_ipv4]->arg : "0.0.0.0";
- snprintf(ssmpingd_ip_xpath, sizeof(ssmpingd_ip_xpath),
- FRR_PIM_VRF_XPATH,
- "frr-pim:pimd", "pim", vrfname, "frr-routing:ipv4");
- strlcat(ssmpingd_ip_xpath, "/ssm-pingd-source-ip",
- sizeof(ssmpingd_ip_xpath));
-
- nb_cli_enqueue_change(vty, ssmpingd_ip_xpath, NB_OP_DESTROY,
- source_str);
-
- return nb_cli_apply_changes(vty, NULL);
+ return pim_process_ssmpingd_cmd(vty, NB_OP_DESTROY, src_str);
}
DEFUN (ip_pim_ecmp,
diff --git a/pimd/pim_cmd_common.c b/pimd/pim_cmd_common.c
index 0992a60de9..fa61cfc06b 100644
--- a/pimd/pim_cmd_common.c
+++ b/pimd/pim_cmd_common.c
@@ -2840,3 +2840,25 @@ int gm_process_no_last_member_query_interval_cmd(struct vty *vty)
return nb_cli_apply_changes(vty, FRR_GMP_INTERFACE_XPATH,
FRR_PIM_AF_XPATH_VAL);
}
+
+
+int pim_process_ssmpingd_cmd(struct vty *vty, enum nb_operation operation,
+ const char *src_str)
+{
+ const char *vrfname;
+ char ssmpingd_ip_xpath[XPATH_MAXLEN];
+
+ vrfname = pim_cli_get_vrf_name(vty);
+ if (vrfname == NULL)
+ return CMD_WARNING_CONFIG_FAILED;
+
+ snprintf(ssmpingd_ip_xpath, sizeof(ssmpingd_ip_xpath),
+ FRR_PIM_VRF_XPATH, "frr-pim:pimd", "pim", vrfname,
+ FRR_PIM_AF_XPATH_VAL);
+ strlcat(ssmpingd_ip_xpath, "/ssm-pingd-source-ip",
+ sizeof(ssmpingd_ip_xpath));
+
+ nb_cli_enqueue_change(vty, ssmpingd_ip_xpath, operation, src_str);
+
+ return nb_cli_apply_changes(vty, NULL);
+}
diff --git a/pimd/pim_cmd_common.h b/pimd/pim_cmd_common.h
index 3bcd0d5d6d..f5e0ef5878 100644
--- a/pimd/pim_cmd_common.h
+++ b/pimd/pim_cmd_common.h
@@ -102,6 +102,8 @@ int gm_process_no_last_member_query_count_cmd(struct vty *vty);
int gm_process_last_member_query_interval_cmd(struct vty *vty,
const char *lmqi_str);
int gm_process_no_last_member_query_interval_cmd(struct vty *vty);
+int pim_process_ssmpingd_cmd(struct vty *vty, enum nb_operation operation,
+ const char *src_str);
/*
* Special Macro to allow us to get the correct pim_instance
*/
diff --git a/pimd/pim_ssmpingd.c b/pimd/pim_ssmpingd.c
index afa7e37da1..d86be85bd8 100644
--- a/pimd/pim_ssmpingd.c
+++ b/pimd/pim_ssmpingd.c
@@ -361,10 +361,8 @@ int pim_ssmpingd_start(struct pim_instance *pim, pim_addr source_addr)
return 0;
}
- {
- zlog_info("%s: starting ssmpingd for source %pPAs", __func__,
- &source_addr);
- }
+ zlog_info("%s: starting ssmpingd for source %pPAs", __func__,
+ &source_addr);
ss = ssmpingd_new(pim, source_addr);
if (!ss) {
diff --git a/pimd/pim_vty.c b/pimd/pim_vty.c
index b360181f43..b0db6b4d96 100644
--- a/pimd/pim_vty.c
+++ b/pimd/pim_vty.c
@@ -264,8 +264,8 @@ int pim_global_config_write_worker(struct pim_instance *pim, struct vty *vty)
struct ssmpingd_sock *ss;
++writes;
for (ALL_LIST_ELEMENTS_RO(pim->ssmpingd_list, node, ss)) {
- vty_out(vty, "%sip ssmpingd %pPA\n", spaces,
- &ss->source_addr);
+ vty_out(vty, "%s" PIM_AF_NAME " ssmpingd %pPA\n",
+ spaces, &ss->source_addr);
++writes;
}
}
diff --git a/tests/topotests/multicast_pim_sm_topo3/test_multicast_pim_sm_topo3.py b/tests/topotests/multicast_pim_sm_topo3/test_multicast_pim_sm_topo3.py
index 304128e44c..6f3867cc2c 100755
--- a/tests/topotests/multicast_pim_sm_topo3/test_multicast_pim_sm_topo3.py
+++ b/tests/topotests/multicast_pim_sm_topo3/test_multicast_pim_sm_topo3.py
@@ -2834,9 +2834,7 @@ def test_mroute_after_removing_RP_sending_IGMP_prune_p2(request):
intf_f1_i8 = topo["routers"]["f1"]["links"]["i8"]["interface"]
input_traffic = {"f1": {"traffic_sent": [intf_f1_i8]}}
- traffic_before = verify_multicast_traffic(
- tgen, input_traffic, return_traffic=True, expected=False
- )
+ traffic_before = verify_multicast_traffic(tgen, input_traffic, return_traffic=True)
assert isinstance(traffic_before, dict), (
"Testcase {} : Failed \n traffic_before is not dictionary \n "
"Error: {}".format(tc_name, result)
@@ -2861,9 +2859,7 @@ def test_mroute_after_removing_RP_sending_IGMP_prune_p2(request):
intf_f1_i8 = topo["routers"]["f1"]["links"]["i8"]["interface"]
input_traffic = {"f1": {"traffic_sent": [intf_f1_i8]}}
- traffic_after = verify_multicast_traffic(
- tgen, input_traffic, return_traffic=True, expected=False
- )
+ traffic_after = verify_multicast_traffic(tgen, input_traffic, return_traffic=True)
assert isinstance(traffic_after, dict), (
"Testcase {} : Failed \n traffic_after is not dictionary \n "
"Error: {}".format(tc_name, result)
@@ -3274,8 +3270,6 @@ def test_prune_sent_to_LHR_and_FHR_when_PIMnbr_down_p2(request):
intf_r2_l1 = topo["routers"]["r2"]["links"]["l1"]["interface"]
shutdown_bringup_interface(tgen, "r2", intf_r2_l1, False)
- app_helper.stop_host("i2")
-
step("Verify RP info after Shut the link from FHR to RP from RP node")
dut = "l1"
rp_address = "1.0.5.17"
@@ -3426,8 +3420,6 @@ def test_prune_sent_to_LHR_and_FHR_when_PIMnbr_down_p2(request):
step("Verify PIM Nbrs after Shut the link from FHR to RP from FHR node")
- app_helper.stop_host("i6")
-
step("Verify RP info after Shut the link from FHR to RP from FHR node")
dut = "l1"
rp_address = "1.0.5.17"
diff --git a/zebra/zebra_evpn_mh.c b/zebra/zebra_evpn_mh.c
index 02eda4a438..6c4e8b99f7 100644
--- a/zebra/zebra_evpn_mh.c
+++ b/zebra/zebra_evpn_mh.c
@@ -3286,7 +3286,7 @@ DEFPY_HIDDEN(zebra_evpn_es_bypass, zebra_evpn_es_bypass_cmd,
} else {
if (!zebra_evpn_is_if_es_capable(zif)) {
vty_out(vty,
- "%%DF bypass cannot be associated with this interface type\n");
+ "%% DF bypass cannot be associated with this interface type\n");
return CMD_WARNING;
}
zebra_evpn_es_bypass_cfg_update(zif, true);
@@ -3311,7 +3311,7 @@ DEFPY(zebra_evpn_es_pref, zebra_evpn_es_pref_cmd,
} else {
if (!zebra_evpn_is_if_es_capable(zif)) {
vty_out(vty,
- "%%DF preference cannot be associated with this interface type\n");
+ "%% DF preference cannot be associated with this interface type\n");
return CMD_WARNING;
}
zebra_evpn_es_df_pref_update(zif, df_pref);
@@ -3341,25 +3341,26 @@ DEFPY(zebra_evpn_es_sys_mac,
ret = zebra_evpn_es_sys_mac_update(zif, &zero_mac);
if (ret == -1) {
- vty_out(vty, "%%Failed to clear ES sysmac\n");
+ vty_out(vty, "%% Failed to clear ES sysmac\n");
return CMD_WARNING;
}
} else {
if (!zebra_evpn_is_if_es_capable(zif)) {
vty_out(vty,
- "%%ESI cannot be associated with this interface type\n");
+ "%% ESI cannot be associated with this interface type\n");
return CMD_WARNING;
}
if (!mac || is_zero_mac(&mac->eth_addr)) {
- vty_out(vty, "%%ES sysmac value is invalid\n");
+ vty_out(vty, "%% ES sysmac value is invalid\n");
return CMD_WARNING;
}
ret = zebra_evpn_es_sys_mac_update(zif, &mac->eth_addr);
if (ret == -1) {
- vty_out(vty, "%%ESI already exists on a different interface\n");
+ vty_out(vty,
+ "%% ESI already exists on a different interface\n");
return CMD_WARNING;
}
}
@@ -3392,25 +3393,27 @@ DEFPY(zebra_evpn_es_id,
ret = zebra_evpn_es_type0_esi_update(zif, zero_esi);
if (ret == -1) {
- vty_out(vty, "%%Failed to clear ES local id\n");
+ vty_out(vty,
+ "%% Failed to clear ES local id or ESI name\n");
return CMD_WARNING;
}
} else {
if (!zebra_evpn_is_if_es_capable(zif)) {
vty_out(vty,
- "%%ESI cannot be associated with this interface type\n");
+ "%% ESI cannot be associated with this interface type\n");
return CMD_WARNING;
}
if (esi_str) {
if (!str_to_esi(esi_str, &esi)) {
- vty_out(vty, "%% Malformed ESI\n");
+ vty_out(vty, "%% Malformed ESI name\n");
return CMD_WARNING;
}
ret = zebra_evpn_es_type0_esi_update(zif, &esi);
} else {
if (!es_lid) {
- vty_out(vty, "%%Specify local ES ID\n");
+ vty_out(vty,
+ "%% Specify ES local id or ESI name\n");
return CMD_WARNING;
}
ret = zebra_evpn_es_lid_update(zif, es_lid);
@@ -3418,7 +3421,7 @@ DEFPY(zebra_evpn_es_id,
if (ret == -1) {
vty_out(vty,
- "%%ESI already exists on a different interface\n");
+ "%% ESI already exists on a different interface\n");
return CMD_WARNING;
}
}