diff options
| -rw-r--r-- | bgpd/bgp_attr.c | 51 | ||||
| -rw-r--r-- | bgpd/bgp_fsm.c | 6 | ||||
| -rw-r--r-- | bgpd/bgp_nht.c | 23 | ||||
| -rw-r--r-- | bgpd/bgp_vty.c | 17 | ||||
| -rw-r--r-- | bgpd/bgp_zebra.c | 7 | ||||
| -rw-r--r-- | bgpd/bgpd.c | 21 | ||||
| -rw-r--r-- | bgpd/bgpd.h | 16 | ||||
| -rw-r--r-- | doc/user/bgp.rst | 10 | ||||
| -rw-r--r-- | lib/nexthop.h | 11 | ||||
| -rw-r--r-- | tests/bgpd/test_aspath.c | 2 | ||||
| -rw-r--r-- | zebra/zebra_rib.c | 5 |
11 files changed, 110 insertions, 59 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index eed4657001..f00bb2b3cd 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -1176,7 +1176,7 @@ bgp_attr_malformed(struct bgp_attr_parser_args *args, uint8_t subcode, return BGP_ATTR_PARSE_PROCEED; /* Core attributes, particularly ones which may influence route - * selection, should always cause session resets + * selection, should be treat-as-withdraw. */ case BGP_ATTR_ORIGIN: case BGP_ATTR_AS_PATH: @@ -1184,11 +1184,13 @@ bgp_attr_malformed(struct bgp_attr_parser_args *args, uint8_t subcode, case BGP_ATTR_MULTI_EXIT_DISC: case BGP_ATTR_LOCAL_PREF: case BGP_ATTR_COMMUNITIES: + case BGP_ATTR_EXT_COMMUNITIES: + case BGP_ATTR_LARGE_COMMUNITIES: case BGP_ATTR_ORIGINATOR_ID: case BGP_ATTR_CLUSTER_LIST: + return BGP_ATTR_PARSE_WITHDRAW; case BGP_ATTR_MP_REACH_NLRI: case BGP_ATTR_MP_UNREACH_NLRI: - case BGP_ATTR_EXT_COMMUNITIES: bgp_notify_send_with_data(peer, BGP_NOTIFY_UPDATE_ERR, subcode, notify_datap, length); return BGP_ATTR_PARSE_ERROR; @@ -1421,9 +1423,7 @@ static bgp_attr_parse_ret_t bgp_attr_aspath_check(struct peer *const peer, && aspath_confed_check(attr->aspath))) { flog_err(EC_BGP_ATTR_MAL_AS_PATH, "Malformed AS path from %s", peer->host); - bgp_notify_send(peer, BGP_NOTIFY_UPDATE_ERR, - BGP_NOTIFY_UPDATE_MAL_AS_PATH); - return BGP_ATTR_PARSE_ERROR; + return BGP_ATTR_PARSE_WITHDRAW; } /* First AS check for EBGP. */ @@ -1433,9 +1433,7 @@ static bgp_attr_parse_ret_t bgp_attr_aspath_check(struct peer *const peer, flog_err(EC_BGP_ATTR_FIRST_AS, "%s incorrect first AS (must be %u)", peer->host, peer->as); - bgp_notify_send(peer, BGP_NOTIFY_UPDATE_ERR, - BGP_NOTIFY_UPDATE_MAL_AS_PATH); - return BGP_ATTR_PARSE_ERROR; + return BGP_ATTR_PARSE_WITHDRAW; } } @@ -1562,8 +1560,12 @@ bgp_attr_local_pref(struct bgp_attr_parser_args *args) struct attr *const attr = args->attr; const bgp_size_t length = args->length; - /* Length check. */ - if (length != 4) { + /* if received from an internal neighbor, it SHALL be considered + * malformed if its length is not equal to 4. If malformed, the + * UPDATE message SHALL be handled using the approach of "treat-as- + * withdraw". + */ + if (peer->sort == BGP_PEER_IBGP && length != 4) { flog_err(EC_BGP_ATTR_LEN, "LOCAL_PREF attribute length isn't 4 [%u]", length); return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_ATTR_LENG_ERR, @@ -1617,7 +1619,8 @@ static int bgp_attr_aggregator(struct bgp_attr_parser_args *args) int wantedlen = 6; /* peer with AS4 will send 4 Byte AS, peer without will send 2 Byte */ - if (CHECK_FLAG(peer->cap, PEER_CAP_AS4_RCV)) + if (CHECK_FLAG(peer->cap, PEER_CAP_AS4_RCV) + && CHECK_FLAG(peer->cap, PEER_CAP_AS4_ADV)) wantedlen = 8; if (length != wantedlen) { @@ -1792,6 +1795,9 @@ bgp_attr_community(struct bgp_attr_parser_args *args) /* XXX: fix community_parse to use stream API and remove this */ stream_forward_getp(peer->curr, length); + /* The Community attribute SHALL be considered malformed if its + * length is not a non-zero multiple of 4. + */ if (!attr->community) return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_OPT_ATTR_ERR, args->total); @@ -1809,7 +1815,11 @@ bgp_attr_originator_id(struct bgp_attr_parser_args *args) struct attr *const attr = args->attr; const bgp_size_t length = args->length; - /* Length check. */ + /* if received from an internal neighbor, it SHALL be considered + * malformed if its length is not equal to 4. If malformed, the + * UPDATE message SHALL be handled using the approach of "treat-as- + * withdraw". + */ if (length != 4) { flog_err(EC_BGP_ATTR_LEN, "Bad originator ID length %d", length); @@ -1833,7 +1843,11 @@ bgp_attr_cluster_list(struct bgp_attr_parser_args *args) struct attr *const attr = args->attr; const bgp_size_t length = args->length; - /* Check length. */ + /* if received from an internal neighbor, it SHALL be considered + * malformed if its length is not a non-zero multiple of 4. If + * malformed, the UPDATE message SHALL be handled using the approach + * of "treat-as-withdraw". + */ if (length % 4) { flog_err(EC_BGP_ATTR_LEN, "Bad cluster list length %d", length); @@ -2150,6 +2164,9 @@ bgp_attr_ext_communities(struct bgp_attr_parser_args *args) /* XXX: fix ecommunity_parse to use stream API */ stream_forward_getp(peer->curr, length); + /* The Extended Community attribute SHALL be considered malformed if + * its length is not a non-zero multiple of 8. + */ if (!attr->ecommunity) return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_OPT_ATTR_ERR, args->total); @@ -2754,14 +2771,14 @@ static int bgp_attr_check(struct peer *peer, struct attr *attr) && !CHECK_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_LOCAL_PREF))) type = BGP_ATTR_LOCAL_PREF; + /* If any of the well-known mandatory attributes are not present + * in an UPDATE message, then "treat-as-withdraw" MUST be used. + */ if (type) { flog_warn(EC_BGP_MISSING_ATTRIBUTE, "%s Missing well-known attribute %s.", peer->host, lookup_msg(attr_str, type, NULL)); - bgp_notify_send_with_data(peer, BGP_NOTIFY_UPDATE_ERR, - BGP_NOTIFY_UPDATE_MISS_ATTR, &type, - 1); - return BGP_ATTR_PARSE_ERROR; + return BGP_ATTR_PARSE_WITHDRAW; } return BGP_ATTR_PARSE_PROCEED; } diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index 72ee195594..e0a9e3e4f0 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -576,7 +576,9 @@ const char *const peer_down_str[] = {"", "Waiting for NHT", "Waiting for Peer IPv6 LLA", "Waiting for VRF to be initialized", - "No AFI/SAFI activated for peer"}; + "No AFI/SAFI activated for peer", + "AS Set config change", + "Waiting for peer OPEN"}; static int bgp_graceful_restart_timer_expire(struct thread *thread) { @@ -1993,7 +1995,7 @@ void bgp_fsm_event_update(struct peer *peer, int valid) case OpenSent: case OpenConfirm: case Established: - if (!valid && (peer->gtsm_hops == 1)) + if (!valid && (peer->gtsm_hops == BGP_GTSM_HOPS_CONNECTED)) BGP_EVENT_ADD(peer, TCP_fatal_error); case Clearing: case Deleted: diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c index f2c3ab19b8..3060fe482c 100644 --- a/bgpd/bgp_nht.c +++ b/bgpd/bgp_nht.c @@ -789,13 +789,22 @@ static void evaluate_paths(struct bgp_nexthop_cache *bnc) bgp_process(bgp_path, rn, afi, safi); } - if (peer && !CHECK_FLAG(bnc->flags, BGP_NEXTHOP_PEER_NOTIFIED)) { - if (BGP_DEBUG(nht, NHT)) - zlog_debug("%s: Updating peer (%s(%s)) status with NHT", - __FUNCTION__, peer->host, - peer->bgp->name_pretty); - bgp_fsm_event_update(peer, bgp_isvalid_nexthop(bnc)); - SET_FLAG(bnc->flags, BGP_NEXTHOP_PEER_NOTIFIED); + if (peer) { + int valid_nexthops = bgp_isvalid_nexthop(bnc); + + if (valid_nexthops) + peer->last_reset = PEER_DOWN_WAITING_OPEN; + else + peer->last_reset = PEER_DOWN_WAITING_NHT; + + if (!CHECK_FLAG(bnc->flags, BGP_NEXTHOP_PEER_NOTIFIED)) { + if (BGP_DEBUG(nht, NHT)) + zlog_debug("%s: Updating peer (%s(%s)) status with NHT", + __FUNCTION__, peer->host, + peer->bgp->name_pretty); + bgp_fsm_event_update(peer, valid_nexthops); + SET_FLAG(bnc->flags, BGP_NEXTHOP_PEER_NOTIFIED); + } } RESET_FLAG(bnc->change_flags); diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index e55548f713..f57f0036d7 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -6901,7 +6901,7 @@ DEFUN (neighbor_ttl_security, * If 'neighbor swpX', then this is for directly connected peers, * we should not accept a ttl-security hops value greater than 1. */ - if (peer->conf_if && (gtsm_hops > 1)) { + if (peer->conf_if && (gtsm_hops > BGP_GTSM_HOPS_CONNECTED)) { vty_out(vty, "%s is directly connected peer, hops cannot exceed 1\n", argv[idx_peer]->arg); @@ -8612,7 +8612,7 @@ static void bgp_show_peer_reset(struct vty * vty, struct peer *peer, : "received", code_str, subcode_str); } else { - vty_out(vty, " %s\n", + vty_out(vty, " %s\n", peer_down_str[(int)peer->last_reset]); } } @@ -8668,7 +8668,7 @@ static void bgp_show_failed_summary(struct vty *vty, struct bgp *bgp, if (len < max_neighbor_width) vty_out(vty, "%*s", max_neighbor_width - len, " "); - vty_out(vty, "%7d %7d %8s", peer->established, + vty_out(vty, "%7d %7d %9s", peer->established, peer->dropped, peer_uptime(peer->uptime, timebuf, BGP_UPTIME_LEN, 0, NULL)); @@ -11939,7 +11939,7 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json, /* EBGP Multihop and GTSM */ if (p->sort != BGP_PEER_IBGP) { if (use_json) { - if (p->gtsm_hops > 0) + if (p->gtsm_hops > BGP_GTSM_HOPS_DISABLED) json_object_int_add(json_neigh, "externalBgpNbrMaxHopsAway", p->gtsm_hops); @@ -11948,7 +11948,7 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json, "externalBgpNbrMaxHopsAway", p->ttl); } else { - if (p->gtsm_hops > 0) + if (p->gtsm_hops > BGP_GTSM_HOPS_DISABLED) vty_out(vty, " External BGP neighbor may be up to %d hops away.\n", p->gtsm_hops); @@ -11958,7 +11958,7 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json, p->ttl); } } else { - if (p->gtsm_hops > 0) { + if (p->gtsm_hops > BGP_GTSM_HOPS_DISABLED) { if (use_json) json_object_int_add(json_neigh, "internalBgpNbrMaxHopsAway", @@ -14450,7 +14450,8 @@ static void bgp_config_write_peer_global(struct vty *vty, struct bgp *bgp, /* ebgp-multihop */ if (peer->sort != BGP_PEER_IBGP && peer->ttl != BGP_DEFAULT_TTL - && !(peer->gtsm_hops != 0 && peer->ttl == MAXTTL)) { + && !(peer->gtsm_hops != BGP_GTSM_HOPS_DISABLED + && peer->ttl == MAXTTL)) { if (!peer_group_active(peer) || g_peer->ttl != peer->ttl) { vty_out(vty, " neighbor %s ebgp-multihop %d\n", addr, peer->ttl); @@ -14458,7 +14459,7 @@ static void bgp_config_write_peer_global(struct vty *vty, struct bgp *bgp, } /* ttl-security hops */ - if (peer->gtsm_hops != 0) { + if (peer->gtsm_hops != BGP_GTSM_HOPS_DISABLED) { if (!peer_group_active(peer) || g_peer->gtsm_hops != peer->gtsm_hops) { vty_out(vty, " neighbor %s ttl-security hops %d\n", diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 068b6794e7..bb718c355f 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -279,13 +279,13 @@ static int bgp_ifp_down(struct interface *ifp) * tracked (directly connected) IBGP peers. */ if ((peer->ttl != BGP_DEFAULT_TTL) - && (peer->gtsm_hops != 1) + && (peer->gtsm_hops != BGP_GTSM_HOPS_CONNECTED) && (!peer->bfd_info || bgp_bfd_is_peer_multihop(peer))) #else /* Take down directly connected EBGP peers */ if ((peer->ttl != BGP_DEFAULT_TTL) - && (peer->gtsm_hops != 1)) + && (peer->gtsm_hops != BGP_GTSM_HOPS_CONNECTED)) #endif continue; @@ -451,7 +451,8 @@ static int bgp_interface_vrf_update(ZAPI_CALLBACK_ARGS) if (!CHECK_FLAG(bgp->flags, BGP_FLAG_NO_FAST_EXT_FAILOVER)) { for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) { if ((peer->ttl != BGP_DEFAULT_TTL) - && (peer->gtsm_hops != 1)) + && (peer->gtsm_hops + != BGP_GTSM_HOPS_CONNECTED)) continue; if (ifp == peer->nexthop.ifp) diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index fa64420cfd..34581b66fc 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -2417,7 +2417,7 @@ struct peer_group *peer_group_get(struct bgp *bgp, const char *name) group->conf->group = group; group->conf->as = 0; group->conf->ttl = BGP_DEFAULT_TTL; - group->conf->gtsm_hops = 0; + group->conf->gtsm_hops = BGP_GTSM_HOPS_DISABLED; group->conf->v_routeadv = BGP_DEFAULT_EBGP_ROUTEADV; SET_FLAG(group->conf->sflags, PEER_STATUS_GROUP); listnode_add_sort(bgp->group, group); @@ -4321,7 +4321,7 @@ int peer_ebgp_multihop_set(struct peer *peer, int ttl) if (ttl != MAXTTL) { if (CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP)) { group = peer->group; - if (group->conf->gtsm_hops != 0) + if (group->conf->gtsm_hops != BGP_GTSM_HOPS_DISABLED) return BGP_ERR_NO_EBGP_MULTIHOP_WITH_TTLHACK; for (ALL_LIST_ELEMENTS(group->peer, node, nnode, @@ -4329,11 +4329,11 @@ int peer_ebgp_multihop_set(struct peer *peer, int ttl) if (peer1->sort == BGP_PEER_IBGP) continue; - if (peer1->gtsm_hops != 0) + if (peer1->gtsm_hops != BGP_GTSM_HOPS_DISABLED) return BGP_ERR_NO_EBGP_MULTIHOP_WITH_TTLHACK; } } else { - if (peer->gtsm_hops != 0) + if (peer->gtsm_hops != BGP_GTSM_HOPS_DISABLED) return BGP_ERR_NO_EBGP_MULTIHOP_WITH_TTLHACK; } } @@ -4374,7 +4374,7 @@ int peer_ebgp_multihop_unset(struct peer *peer) if (peer->sort == BGP_PEER_IBGP) return 0; - if (peer->gtsm_hops != 0 && peer->ttl != MAXTTL) + if (peer->gtsm_hops != BGP_GTSM_HOPS_DISABLED && peer->ttl != MAXTTL) return BGP_ERR_NO_EBGP_MULTIHOP_WITH_TTLHACK; if (peer_group_active(peer)) @@ -6567,7 +6567,8 @@ int peer_ttl_security_hops_set(struct peer *peer, int gtsm_hops) mess of this configuration parameter, and OpenBGPD got it right. */ - if ((peer->gtsm_hops == 0) && (peer->sort != BGP_PEER_IBGP)) { + if ((peer->gtsm_hops == BGP_GTSM_HOPS_DISABLED) + && (peer->sort != BGP_PEER_IBGP)) { if (is_ebgp_multihop_configured(peer)) return BGP_ERR_NO_EBGP_MULTIHOP_WITH_TTLHACK; @@ -6630,7 +6631,9 @@ int peer_ttl_security_hops_set(struct peer *peer, int gtsm_hops) * no session then do nothing (will get * handled by next connection) */ - if (peer->fd >= 0 && peer->gtsm_hops != 0) + if (peer->fd >= 0 + && peer->gtsm_hops + != BGP_GTSM_HOPS_DISABLED) sockopt_minttl( peer->su.sa.sa_family, peer->fd, MAXTTL + 1 - peer->gtsm_hops); @@ -6661,7 +6664,7 @@ int peer_ttl_security_hops_unset(struct peer *peer) if (peer_group_active(peer)) peer->gtsm_hops = peer->group->conf->gtsm_hops; else - peer->gtsm_hops = 0; + peer->gtsm_hops = BGP_GTSM_HOPS_DISABLED; if (!CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP)) { /* Invoking ebgp_multihop_set will set the TTL back to the @@ -6684,7 +6687,7 @@ int peer_ttl_security_hops_unset(struct peer *peer) } else { group = peer->group; for (ALL_LIST_ELEMENTS(group->peer, node, nnode, peer)) { - peer->gtsm_hops = 0; + peer->gtsm_hops = BGP_GTSM_HOPS_DISABLED; if (peer->sort == BGP_PEER_EBGP) ret = peer_ebgp_multihop_unset(peer); else { diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h index 752cb071cd..548dfe4683 100644 --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h @@ -723,7 +723,9 @@ struct bgp_nexthop { #define RMAP_OUT 1 #define RMAP_MAX 2 -#define BGP_DEFAULT_TTL 1 +#define BGP_DEFAULT_TTL 1 +#define BGP_GTSM_HOPS_DISABLED 0 +#define BGP_GTSM_HOPS_CONNECTED 1 #include "filter.h" @@ -1321,10 +1323,10 @@ struct peer { #define PEER_DOWN_REMOTE_AS_CHANGE 2 /* neighbor remote-as command */ #define PEER_DOWN_LOCAL_AS_CHANGE 3 /* neighbor local-as command */ #define PEER_DOWN_CLID_CHANGE 4 /* bgp cluster-id command */ -#define PEER_DOWN_CONFED_ID_CHANGE 5 /* bgp confederation identifier command */ +#define PEER_DOWN_CONFED_ID_CHANGE 5 /* bgp confederation id command */ #define PEER_DOWN_CONFED_PEER_CHANGE 6 /* bgp confederation peer command */ -#define PEER_DOWN_RR_CLIENT_CHANGE 7 /* neighbor route-reflector-client command */ -#define PEER_DOWN_RS_CLIENT_CHANGE 8 /* neighbor route-server-client command */ +#define PEER_DOWN_RR_CLIENT_CHANGE 7 /* neighbor rr-client command */ +#define PEER_DOWN_RS_CLIENT_CHANGE 8 /* neighbor rs-client command */ #define PEER_DOWN_UPDATE_SOURCE_CHANGE 9 /* neighbor update-source command */ #define PEER_DOWN_AF_ACTIVATE 10 /* neighbor activate command */ #define PEER_DOWN_USER_SHUTDOWN 11 /* neighbor shutdown command */ @@ -1348,6 +1350,12 @@ struct peer { #define PEER_DOWN_VRF_UNINIT 29 /* Associated VRF is not init yet */ #define PEER_DOWN_NOAFI_ACTIVATED 30 /* No AFI/SAFI activated for peer */ #define PEER_DOWN_AS_SETS_REJECT 31 /* Reject routes with AS_SET */ +#define PEER_DOWN_WAITING_OPEN 32 /* Waiting for open to succeed */ + /* + * Remember to update peer_down_str in bgp_fsm.c when you add + * a new value to the last_reset reason + */ + size_t last_reset_cause_size; uint8_t last_reset_cause[BGP_MAX_PACKET_SIZE]; diff --git a/doc/user/bgp.rst b/doc/user/bgp.rst index 81b4e34647..bacb69b815 100644 --- a/doc/user/bgp.rst +++ b/doc/user/bgp.rst @@ -424,6 +424,16 @@ Reject routes with AS_SET or AS_CONFED_SET types This command enables rejection of incoming and outgoing routes having AS_SET or AS_CONFED_SET type. +Disable checking if nexthop is connected on EBGP sessions +--------------------------------------------------------- + +.. index:: [no] bgp disable-ebgp-connected-route-check +.. clicmd:: [no] bgp disable-ebgp-connected-route-check + + This command is used to disable the connection verification process for EBGP peering sessions + that are reachable by a single hop but are configured on a loopback interface or otherwise + configured with a non-directly connected IP address. + .. _bgp-route-flap-dampening: Route Flap Dampening diff --git a/lib/nexthop.h b/lib/nexthop.h index cb5efe00cc..6710914e40 100644 --- a/lib/nexthop.h +++ b/lib/nexthop.h @@ -79,10 +79,13 @@ struct nexthop { #define NEXTHOP_FLAG_ACTIVE (1 << 0) /* This nexthop is alive. */ #define NEXTHOP_FLAG_FIB (1 << 1) /* FIB nexthop. */ #define NEXTHOP_FLAG_RECURSIVE (1 << 2) /* Recursive nexthop. */ -#define NEXTHOP_FLAG_ONLINK (1 << 3) /* Nexthop should be installed onlink. */ -#define NEXTHOP_FLAG_MATCHED (1 << 4) /* Already matched vs a nexthop */ -#define NEXTHOP_FLAG_DUPLICATE (1 << 5) /* nexthop duplicates another active one */ -#define NEXTHOP_FLAG_RNH_FILTERED (1 << 6) /* rmap filtered, used by rnh */ +#define NEXTHOP_FLAG_ONLINK (1 << 3) /* Nexthop should be installed + * onlink. + */ +#define NEXTHOP_FLAG_DUPLICATE (1 << 4) /* nexthop duplicates another + * active one + */ +#define NEXTHOP_FLAG_RNH_FILTERED (1 << 5) /* rmap filtered, used by rnh */ #define NEXTHOP_IS_ACTIVE(flags) \ (CHECK_FLAG(flags, NEXTHOP_FLAG_ACTIVE) \ && !CHECK_FLAG(flags, NEXTHOP_FLAG_DUPLICATE)) diff --git a/tests/bgpd/test_aspath.c b/tests/bgpd/test_aspath.c index 925d3112d3..9feec7156a 100644 --- a/tests/bgpd/test_aspath.c +++ b/tests/bgpd/test_aspath.c @@ -653,7 +653,7 @@ static struct aspath_tests { &test_segments[6], NULL, AS4_DATA, - -1, + -2, PEER_CAP_AS4_ADV, { COMMON_ATTRS, diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index f3112cc9c0..57bd986872 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -2450,7 +2450,7 @@ void _route_entry_dump(const char *func, union prefixconstptr pp, INET6_ADDRSTRLEN); break; } - zlog_debug("%s: %s %s[%u] vrf %s(%u) with flags %s%s%s%s%s%s", + zlog_debug("%s: %s %s[%u] vrf %s(%u) with flags %s%s%s%s%s", straddr, (nexthop->rparent ? " NH" : "NH"), nhname, nexthop->ifindex, vrf ? vrf->name : "Unknown", nexthop->vrf_id, @@ -2466,9 +2466,6 @@ void _route_entry_dump(const char *func, union prefixconstptr pp, (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_ONLINK) ? "ONLINK " : ""), - (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_MATCHED) - ? "MATCHED " - : ""), (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_DUPLICATE) ? "DUPLICATE " : "")); |
