From: Alan T. DeKok Date: Fri, 21 Jun 2024 14:53:44 +0000 (-0400) Subject: add tests for simple password auth type X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ecb567de2ec5d28ae6812daca91cebf5d1e5cd2f;p=thirdparty%2Ffreeradius-server.git add tests for simple password auth type --- diff --git a/share/dictionary/bfd/dictionary.rfc5880 b/share/dictionary/bfd/dictionary.rfc5880 index 2b35c8b6922..1e61683e4ab 100644 --- a/share/dictionary/bfd/dictionary.rfc5880 +++ b/share/dictionary/bfd/dictionary.rfc5880 @@ -46,7 +46,7 @@ VALUE state up 3 STRUCT simple-password auth-type 1 length=uint8,offset=2 MEMBER key-id uint8 MEMBER reserved uint8 -MEMBER password string[1] # really 1..16 +MEMBER password string # really 1..16 STRUCT keyed-md5 auth-type 2 length=uint8,offset=2 MEMBER key-id uint8 diff --git a/src/tests/unit/protocols/bfd/base.txt b/src/tests/unit/protocols/bfd/base.txt index 23ad47eeca3..e70ea6a28e1 100644 --- a/src/tests/unit/protocols/bfd/base.txt +++ b/src/tests/unit/protocols/bfd/base.txt @@ -27,5 +27,14 @@ match 20 c0 03 18 de ad be ef 21 12 68 09 00 00 00 1f 00 00 00 7f 00 00 00 ff 21 decode-proto - match Packet-Type = Up, Packet = { version = 1, diagnostic = none, state = up, poll = no, final = no, control-plane-independent = no, auth-present = no, demand = no, multipoint = no, detect-multi = 3, length = 24, my-discriminator = 3735928559, your-discriminator = 554854409, desired-min-tx-interval = 31, required-min-tx-interval = 127, required-min-echo-interval = 255 }, Additional-Data = { Stripped-User-Name = "foo" } +# +# With authentication type +# +encode-proto Packet-Type = Up, Packet = { version = 1, diagnostic = none, state = up, poll = no, final = no, control-plane-independent = no, auth-present = yes, demand = no, multipoint = no, detect-multi = 3, length = 24, my-discriminator = 3735928559, your-discriminator = 554854409, desired-min-tx-interval = 31, required-min-tx-interval = 127, required-min-echo-interval = 255, auth-type.simple-password = { key-id = 0, reserved = 0, password = "hello" } } +match 20 c4 03 21 de ad be ef 21 12 68 09 00 00 00 1f 00 00 00 7f 00 00 00 ff 00 09 00 00 68 65 6c 6c 6f + +#decode-proto - +#match Packet-Type = Up, raw.Packet = 0x20c40321deadbeef211268090000001f0000007f000000ff0009000068656c6c6f + count -match 11 +match 13