diff options
-rw-r--r-- | bgpd/bgp_attr.c | 15 | ||||
-rw-r--r-- | bgpd/bgp_linkstate_tlv.c | 14 | ||||
-rw-r--r-- | bgpd/bgp_linkstate_tlv.h | 1 | ||||
-rw-r--r-- | bgpd/bgp_route.c | 10 |
4 files changed, 15 insertions, 25 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 411522464..8427b1b60 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -40,7 +40,6 @@ #endif #include "bgp_evpn.h" #include "bgp_flowspec_private.h" -#include "bgp_linkstate_tlv.h" #include "bgp_mac.h" /* Attribute strings for logging. */ @@ -4006,6 +4005,8 @@ size_t bgp_packet_mpattr_start(struct stream *s, struct peer *peer, afi_t afi, switch (safi) { case SAFI_LINKSTATE: case SAFI_LINKSTATE_VPN: + /* TODO */ + break; case SAFI_UNICAST: case SAFI_MULTICAST: case SAFI_LABELED_UNICAST: @@ -4041,6 +4042,8 @@ size_t bgp_packet_mpattr_start(struct stream *s, struct peer *peer, afi_t afi, switch (safi) { case SAFI_LINKSTATE: case SAFI_LINKSTATE_VPN: + /* TODO */ + break; case SAFI_UNICAST: case SAFI_MULTICAST: case SAFI_LABELED_UNICAST: @@ -4092,8 +4095,10 @@ size_t bgp_packet_mpattr_start(struct stream *s, struct peer *peer, afi_t afi, } break; case AFI_LINKSTATE: + /* TODO */ + break; case AFI_L2VPN: - if (nh_afi == AFI_L2VPN && safi != SAFI_FLOWSPEC) + if (safi != SAFI_FLOWSPEC) flog_err( EC_BGP_ATTR_NH_SEND_LEN, "Bad nexthop when sending to %s, AFI %u SAFI %u nhlen %d", @@ -4145,10 +4150,8 @@ void bgp_packet_mpattr_prefix(struct stream *s, afi_t afi, safi_t safi, addpath_tx_id); break; case SAFI_LINKSTATE: - bgp_nlri_encode_linkstate(s, p); - break; case SAFI_LINKSTATE_VPN: - /* not yet supported */ + /* TODO */ break; case SAFI_FLOWSPEC: stream_putc(s, p->u.prefix_flowspec.prefixlen); @@ -4178,6 +4181,8 @@ size_t bgp_packet_mpattr_prefix_size(afi_t afi, safi_t safi, break; case SAFI_LINKSTATE: case SAFI_LINKSTATE_VPN: + /* TODO */ + break; case SAFI_UNICAST: case SAFI_MULTICAST: break; diff --git a/bgpd/bgp_linkstate_tlv.c b/bgpd/bgp_linkstate_tlv.c index eca6c066a..60f2c029c 100644 --- a/bgpd/bgp_linkstate_tlv.c +++ b/bgpd/bgp_linkstate_tlv.c @@ -71,17 +71,3 @@ int bgp_nlri_parse_linkstate(struct peer *peer, struct attr *attr, } return BGP_NLRI_PARSE_OK; } - -/* - * Encode Link-State prefix in Update (MP_REACH) - */ -void bgp_nlri_encode_linkstate(struct stream *s, const struct prefix *p) -{ - /* NLRI type */ - stream_putw(s, p->u.prefix_linkstate.nlri_type); - - /* Size */ - stream_putw(s, p->prefixlen); - - stream_put(s, (const void *)p->u.prefix_linkstate.ptr, p->prefixlen); -} diff --git a/bgpd/bgp_linkstate_tlv.h b/bgpd/bgp_linkstate_tlv.h index 6e34f1fda..cb2c6ac99 100644 --- a/bgpd/bgp_linkstate_tlv.h +++ b/bgpd/bgp_linkstate_tlv.h @@ -8,6 +8,5 @@ extern int bgp_nlri_parse_linkstate(struct peer *peer, struct attr *attr, struct bgp_nlri *packet, int withdraw); -extern void bgp_nlri_encode_linkstate(struct stream *s, const struct prefix *p); #endif /* BGP_LINKSTATE_TLV_H */ diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index b22b0bafe..a6485a141 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -4729,8 +4729,8 @@ void bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id, (safi == SAFI_UNICAST || safi == SAFI_LABELED_UNICAST || (safi == SAFI_MPLS_VPN && pi->sub_type != BGP_ROUTE_IMPORTED))) || - (safi == SAFI_EVPN && bgp_evpn_is_prefix_nht_supported(p)) || - afi == AFI_LINKSTATE) { + (safi == SAFI_EVPN && + bgp_evpn_is_prefix_nht_supported(p))) { if (safi != SAFI_EVPN && peer->sort == BGP_PEER_EBGP && peer->ttl == BGP_DEFAULT_TTL && !CHECK_FLAG(peer->flags, @@ -4877,9 +4877,9 @@ void bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id, /* Nexthop reachability check. */ if (((afi == AFI_IP || afi == AFI_IP6) && (safi == SAFI_UNICAST || safi == SAFI_LABELED_UNICAST || - (safi == SAFI_MPLS_VPN && new->sub_type != BGP_ROUTE_IMPORTED))) || - (safi == SAFI_EVPN && bgp_evpn_is_prefix_nht_supported(p)) || - afi == AFI_LINKSTATE) { + (safi == SAFI_MPLS_VPN && + new->sub_type != BGP_ROUTE_IMPORTED))) || + (safi == SAFI_EVPN && bgp_evpn_is_prefix_nht_supported(p))) { if (safi != SAFI_EVPN && peer->sort == BGP_PEER_EBGP && peer->ttl == BGP_DEFAULT_TTL && !CHECK_FLAG(peer->flags, |