summaryrefslogtreecommitdiff
path: root/isisd/isis_tlvs.h
diff options
context:
space:
mode:
authorJuraj Vijtiuk <juraj.vijtiuk@sartura.hr>2021-10-13 18:32:53 +0200
committermergify-bot <noreply@mergify.com>2022-02-09 10:49:32 +0000
commit89a12381327b5f42c3905e6ee4a87f7a3f3ef3b5 (patch)
tree4b17c3a5155f3b72b312fcc8152795112300d56c /isisd/isis_tlvs.h
parente3e7df1d3556796a39f110110536ff0d7a542374 (diff)
isisd: fix router capability TLV parsing issues
isis_tlvs.c would fail at multiple places if incorrect TLVs were received causing stream assertion violations. This patch fixes the issues by adding missing length checks, missing consumed length updates and handling malformed Segment Routing subTLVs. Signed-off-by: Juraj Vijtiuk <juraj.vijtiuk@sartura.hr> Small adjustments by Igor Ryzhov: - fix incorrect replacement of srgb by srlb on lines 3052 and 3054 - add length check for ISIS_SUBTLV_ALGORITHM - fix conflict in fuzzing data during rebase Signed-off-by: Igor Ryzhov <iryzhov@nfware.com> (cherry picked from commit 9ba865f54d331c550629304cb25e77ac81455803)
Diffstat (limited to 'isisd/isis_tlvs.h')
-rw-r--r--isisd/isis_tlvs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/isisd/isis_tlvs.h b/isisd/isis_tlvs.h
index 38470ef85e..0c6ed11cb6 100644
--- a/isisd/isis_tlvs.h
+++ b/isisd/isis_tlvs.h
@@ -447,6 +447,7 @@ enum ext_subtlv_size {
/* RFC 8667 sections #2 & #3 */
ISIS_SUBTLV_SID_LABEL_SIZE = 3,
+ ISIS_SUBTLV_SID_INDEX_SIZE = 4,
ISIS_SUBTLV_SID_LABEL_RANGE_SIZE = 9,
ISIS_SUBTLV_ALGORITHM_SIZE = 4,
ISIS_SUBTLV_ADJ_SID_SIZE = 5,