summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHiroki Shirokura <slank.dev@gmail.com>2020-02-04 01:11:29 +0100
committerHiroki Shirokura <slank.dev@gmail.com>2020-02-14 01:13:43 +0100
commite5d4cda0a7bcc0c0ccbd7d6c11dfa63dfa43ff1c (patch)
tree98080418ace01dafecdbb3ed0e92b9aac2190698 /tests
parentbgpd: fix Prefix-SID parse error (diff)
downloadfrr-e5d4cda0a7bcc0c0ccbd7d6c11dfa63dfa43ff1c.tar.xz
frr-e5d4cda0a7bcc0c0ccbd7d6c11dfa63dfa43ff1c.zip
bgpd: fix Prefix-SID parsing failure case
Prefix-SID path attribute Label-index TLV (type-1) is used by SR-MPLS. And Label-index TLV MUST ignored if that path attribute is append on non-Labeled-unicast UPDATE message described on [ref1]. There is a problem case exist arround this implementation. This commit fix that. Before this commit, unfortunally, setting Label-Index value is skipped at somecases. because, Label-Index TLV implementation check the AFI/SAFI pair. by mp_update variable that is set by bgp_mp_reach_parse function. if MP_REACH_NLRI is present after PREFIX_SID, bgp_attr_psid_sub function can't understand AFI/SAFI pair. and the order of each path attributes is never no-deterministic thing for receiver.[ref2] In this commit, I re-located checking code of AFI/SAFI pair after path-attr loop. [ref1](https://tools.ietf.org/html/draft-ietf-idr-bgp-prefix-sid-27#section-3.2) > The Originator SRGB TLV may only appear in a BGP Prefix-SID attribute > attached to IPv4/IPv6 Labeled Unicast prefixes ([RFC8277]). It MUST > be ignored when received for other BGP AFI/SAFI combinations. [ref2](https://tools.ietf.org/html/rfc4271#section-5) > The sender of an UPDATE message SHOULD order path attributes within > the UPDATE message in ascending order of attribute type. The > receiver of an UPDATE message MUST be prepared to handle path > attributes within UPDATE messages that are out of order. Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions