From: Arran Cudbard-Bell Date: Wed, 15 Sep 2021 14:58:58 +0000 (-0500) Subject: Add additional tests which expose errors in the current net to signed, negative int... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a12cba1a96b62949743f2274def0b2b66ceedd0;p=thirdparty%2Ffreeradius-server.git Add additional tests which expose errors in the current net to signed, negative int code --- diff --git a/src/tests/unit/protocols/radius/time_delta.txt b/src/tests/unit/protocols/radius/time_delta.txt index 97ae98c219c..252bf8c32da 100644 --- a/src/tests/unit/protocols/radius/time_delta.txt +++ b/src/tests/unit/protocols/radius/time_delta.txt @@ -48,6 +48,15 @@ match fe 06 04 04 00 41 decode-pair - match Unit-TLV = { Delta-MSec-uint16 = 65 } +encode-pair Unit-TLV.Delta-MSec-int32 = -32768 +match fe 08 0a 06 ff ff 80 00 + +decode-pair - +match Unit-TLV = { Delta-MSec-int32 = -32768 } + +attribute Unit-TLV.Delta-MSec-int32 = -32768 +match Unit-TLV.Delta-MSec-int32 = -32768 + encode-pair Unit-TLV.Delta-MSec-int16 = -32768 match fe 06 06 04 80 00 @@ -112,4 +121,4 @@ decode-pair - match Unit-TLV = { Delta-MSec-int32 = 2147483647 } count -match 52 +match 64