]> git.puffer.fish Git - mirror/frr.git/commit
ospfd: Fix wrong parsing of TE subTLV 10068/head
authorOlivier Dugeon <olivier.dugeon@orange.com>
Mon, 15 Nov 2021 17:19:35 +0000 (18:19 +0100)
committerOlivier Dugeon <olivier.dugeon@orange.com>
Mon, 15 Nov 2021 17:25:58 +0000 (18:25 +0100)
commite3db39db57546ebf52ef6fbe59bd77d1d951616a
tree92bfc2dd5e1b9c0d0cc68c518afbf1cac6684a88
parent67ca5030f7ffa4141588147abe1ffc634941c062
ospfd: Fix wrong parsing of TE subTLV

Function ospf_te_parse_te() and ospf_te_delete_te() browse TE TLV but also
subTLV. The loop that parse the subTLV check that cummulative read data doesn't
exceed the total size of the TLV. However, the sum variable that counts the
number of read data was wrongly intialize to 0 instead to 4 (i.e. the initial
TLV Header size that is located at the TOP of subTLV).

This patch adjust accordingly the initial value of the counter.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
ospfd/ospf_te.c