]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: fix Prefix-SID parse error
authorHiroki Shirokura <slank.dev@gmail.com>
Mon, 3 Feb 2020 23:25:26 +0000 (23:25 +0000)
committerHiroki Shirokura <slank.dev@gmail.com>
Fri, 14 Feb 2020 00:13:43 +0000 (00:13 +0000)
commit38774fc5e6b8da326bbe3700d7d54498aedb154a
treebcaff2674f3c377ad7d66d85f205a4178d2f4634
parent893799b011b8667fd3ebfa4dd504de92eee53126
bgpd: fix Prefix-SID parse error

Prefix-SID is desined to capable for TLV array.
That behaviour is important to support SR-MPLS feature
and that supported by previous PR #5418.

In that implementation, but if some additional data
(such as next BGP update message or next path attributes)
was present after Prefix-SID path attribute,
bgpd will parse that addional data as Prefix-SID TLV.

This commit fix that. before this commit, loop condition
is determed by stream is readable or not. In more correct
implementatoin, the prefix-sid boundaly should be checked
additonally. the length of Prefix-sid path attribute can
be get by bgp_attr_parse_args.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
bgpd/bgp_attr.c