From 2f97139ceab4b677c912fb96106400048ad57f0a Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 13 Apr 2018 16:52:29 +0200 Subject: segtree: Fix for last elem at interval end Unclosed interval check at end of interval_map_decompose() missed to check whether interval start is the last possible element in given set before creating a range expression. This led to the last element incorrectly printed as range from itself to itself. Fix this by comparing the upper boundary against the lower one. In order to keep indenting level low, invert the entry check and jump to the end if it matches. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- tests/py/ip6/srh.t | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/py/ip6/srh.t b/tests/py/ip6/srh.t index 442c78f0..fbaff410 100644 --- a/tests/py/ip6/srh.t +++ b/tests/py/ip6/srh.t @@ -4,15 +4,15 @@ srh last-entry 0;ok srh last-entry 127;ok -srh last-entry { 0, 4-127, 255 };ok;srh last-entry { 0, 4-127, 255-255} +srh last-entry { 0, 4-127, 255 };ok srh flags 0;ok srh flags 127;ok -srh flags { 0, 4-127, 255 };ok;srh flags { 0, 4-127, 255-255} +srh flags { 0, 4-127, 255 };ok srh tag 0;ok srh tag 127;ok -srh tag { 0, 4-127, 0xffff };ok;srh tag { 0, 4-127, 65535-65535} +srh tag { 0, 4-127, 0xffff };ok;srh tag { 0, 4-127, 65535 } srh sid[1] dead::beef;ok srh sid[2] dead::beef;ok -- cgit v1.2.3