From: Nick Porter Date: Fri, 4 Oct 2024 10:41:22 +0000 (+0100) Subject: Test data actually contains options after padding X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb220672e808db7529758cfbabc372e1cbe4e0f7;p=thirdparty%2Ffreeradius-server.git Test data actually contains options after padding which were not correctly decoded before --- diff --git a/src/tests/unit/protocols/dhcpv4/PRIV_bootp-both_overload.txt b/src/tests/unit/protocols/dhcpv4/PRIV_bootp-both_overload.txt index e89ef0378a5..a3ec29017c8 100644 --- a/src/tests/unit/protocols/dhcpv4/PRIV_bootp-both_overload.txt +++ b/src/tests/unit/protocols/dhcpv4/PRIV_bootp-both_overload.txt @@ -32,7 +32,7 @@ proto-dictionary dhcpv4 # options = [message-type=discover max_dhcp_size=590 param_req_list=[1, 28, 3, 43] lease_time=3600 dhcp-option-overload=3 error_message=b'Padding' pad client_id='\x01\x00\x00l\\x82\\xdcN' end] # decode-proto 01 01 06 00 ac 2e ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6c 82 dc 4e 00 00 00 00 00 00 00 00 00 00 38 14 73 6e 61 6d 65 20 66 69 65 6c 64 20 6f 76 65 72 6c 6f 61 64 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 38 18 66 69 6c 65 20 6e 61 6d 65 20 66 69 65 6c 64 20 6f 76 65 72 6c 6f 61 64 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 63 82 53 63 35 01 01 39 02 02 4e 37 04 01 1c 03 2b 33 04 00 00 0e 10 34 01 03 38 07 50 61 64 64 69 6e 67 00 3d 07 01 00 00 6c 82 dc 4e ff -match Opcode = ::Client-Message, Hardware-Type = ::Ethernet, Hardware-Address-Length = 6, Hop-Count = 0, Transaction-Id = 2888761343, Number-of-Seconds = 0, Flags = 0, Client-IP-Address = 0.0.0.0, Your-IP-Address = 0.0.0.0, Server-IP-Address = 0.0.0.0, Gateway-IP-Address = 0.0.0.0, Client-Hardware-Address = 00:00:6c:82:dc:4e, Message-Type = ::Discover, Maximum-Msg-Size = 590, Parameter-Request-List = ::Subnet-Mask, Parameter-Request-List = ::Broadcast-Address, Parameter-Request-List = ::Router-Address, Parameter-Request-List = ::Vendor, IP-Address-Lease-Time = 3600, Overload = 3, Error-Message = "Padding", Error-Message = "sname field overload", Error-Message = "file name field overload", Network-Subnet = 0.0.0.0/32 +match Opcode = ::Client-Message, Hardware-Type = ::Ethernet, Hardware-Address-Length = 6, Hop-Count = 0, Transaction-Id = 2888761343, Number-of-Seconds = 0, Flags = 0, Client-IP-Address = 0.0.0.0, Your-IP-Address = 0.0.0.0, Server-IP-Address = 0.0.0.0, Gateway-IP-Address = 0.0.0.0, Client-Hardware-Address = 00:00:6c:82:dc:4e, Message-Type = ::Discover, Maximum-Msg-Size = 590, Parameter-Request-List = ::Subnet-Mask, Parameter-Request-List = ::Broadcast-Address, Parameter-Request-List = ::Router-Address, Parameter-Request-List = ::Vendor, IP-Address-Lease-Time = 3600, Overload = 3, Error-Message = "Padding", Client-Identifier = 0x0100006c82dc4e, Error-Message = "sname field overload", Error-Message = "file name field overload", Network-Subnet = 0.0.0.0/32 count match 4 diff --git a/src/tests/unit/protocols/dhcpv4/PRIV_bootp-both_overload_empty-no_end.txt b/src/tests/unit/protocols/dhcpv4/PRIV_bootp-both_overload_empty-no_end.txt index 31cd5948fde..4a892a75525 100644 --- a/src/tests/unit/protocols/dhcpv4/PRIV_bootp-both_overload_empty-no_end.txt +++ b/src/tests/unit/protocols/dhcpv4/PRIV_bootp-both_overload_empty-no_end.txt @@ -32,7 +32,7 @@ proto-dictionary dhcpv4 # options = [message-type=discover max_dhcp_size=590 param_req_list=[1, 28, 3, 43] lease_time=3600 dhcp-option-overload=3 error_message=b'Padding' pad client_id='\x01\x00\x00l\\x82\\xdcN' pad] # decode-proto 01 01 06 00 ac 2e ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6c 82 dc 4e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 63 82 53 63 35 01 01 39 02 02 4e 37 04 01 1c 03 2b 33 04 00 00 0e 10 34 01 03 38 07 50 61 64 64 69 6e 67 00 3d 07 01 00 00 6c 82 dc 4e 00 -match Opcode = ::Client-Message, Hardware-Type = ::Ethernet, Hardware-Address-Length = 6, Hop-Count = 0, Transaction-Id = 2888761343, Number-of-Seconds = 0, Flags = 0, Client-IP-Address = 0.0.0.0, Your-IP-Address = 0.0.0.0, Server-IP-Address = 0.0.0.0, Gateway-IP-Address = 0.0.0.0, Client-Hardware-Address = 00:00:6c:82:dc:4e, Message-Type = ::Discover, Maximum-Msg-Size = 590, Parameter-Request-List = ::Subnet-Mask, Parameter-Request-List = ::Broadcast-Address, Parameter-Request-List = ::Router-Address, Parameter-Request-List = ::Vendor, IP-Address-Lease-Time = 3600, Overload = 3, Error-Message = "Padding", Network-Subnet = 0.0.0.0/32 +match Opcode = ::Client-Message, Hardware-Type = ::Ethernet, Hardware-Address-Length = 6, Hop-Count = 0, Transaction-Id = 2888761343, Number-of-Seconds = 0, Flags = 0, Client-IP-Address = 0.0.0.0, Your-IP-Address = 0.0.0.0, Server-IP-Address = 0.0.0.0, Gateway-IP-Address = 0.0.0.0, Client-Hardware-Address = 00:00:6c:82:dc:4e, Message-Type = ::Discover, Maximum-Msg-Size = 590, Parameter-Request-List = ::Subnet-Mask, Parameter-Request-List = ::Broadcast-Address, Parameter-Request-List = ::Router-Address, Parameter-Request-List = ::Vendor, IP-Address-Lease-Time = 3600, Overload = 3, Error-Message = "Padding", Client-Identifier = 0x0100006c82dc4e, Network-Subnet = 0.0.0.0/32 count match 4