summaryrefslogtreecommitdiff
path: root/python/clidef.py
diff options
context:
space:
mode:
authorFredi Raspall <fredi@voltanet.io>2021-05-28 23:06:50 +0200
committerEmanuele Di Pascale <emanuele@voltanet.io>2021-09-28 10:40:32 +0200
commit6c57d010739c1b4f5ce4905ecd7aaeaf6371a48b (patch)
treef8035f134e6dd94c2bcecb86d807bb123a2226f6 /python/clidef.py
parente90c0383244bd9dfe6748c8921320f676697bfdc (diff)
ospfd: validate input SRGB and SRLB
The code was not checking if in these label ranges [a,b], a is smaller than b, which is assumed in several places, including when determining the size of the block as b-a+1. As a consequence, the results of a bad configuration can be unpredictable. Some effects observed were: 1) segfault 2) de-activation of SR due to label reservation failure. The added validation function also checks if the SR blocks are larger than some minimal size. RFC 8665 mandates that the blocks be srictly larger than zero. In this patch, the minimum sized is arbitrarily defined to be 16. Checking if ranges would fall outside [16,1048575] is omitted since the vty filtering takes care of that. Signed-off-by: Fredi Raspall <fredi@voltanet.io>
Diffstat (limited to 'python/clidef.py')
0 files changed, 0 insertions, 0 deletions