Skip to content

Commit

Permalink
Move DHCPv6/rfc3319 tests to src/tests/unit/dhcpv6_rfc3319.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
jpereira authored and alandekok committed Oct 22, 2019
1 parent 247aca8 commit b630eed
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 19 deletions.
1 change: 1 addition & 0 deletions src/tests/unit/all.mk
Expand Up @@ -30,6 +30,7 @@ FILES := \
eap_sim_error.txt \
dhcpv4.txt \
dhcpv6.txt \
dhcpv6_rfc3319.txt \
regex.txt \
escape.txt \
condition.txt \
Expand Down
20 changes: 1 addition & 19 deletions src/tests/unit/dhcpv6.txt
Expand Up @@ -121,12 +121,6 @@ match 00 3d 00 04 00 00 00 16 00 6f 00 04 00 40 00 5e
encode-pair Client-Arch-Type = x86-BIOS
match 00 3d 00 02 00 00

#
# Array of IPv6 addresses
#
encode-pair SIP-Server-Address = 2001:0db8:85a3:0000:0000:8a2e:0370:7334, SIP-Server-Address = 2001:0db8:85a3:0000:0000:8a2e:0370:7335
match 00 16 00 20 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 35

#
# Array of strings, each substring should have a 16bit length field containing its length
#
Expand Down Expand Up @@ -173,18 +167,6 @@ match 00 36 00 28 00 01 00 10 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34 00
encode-pair NTP-Server-Address = 2001:0db8:85a3:0000:0000:8a2e:0370:7334
match 00 38 00 14 00 01 00 10 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34

encode-pair SIP-Server-Domain-Name-List = "foo.ca"
match 00 15 00 08 03 66 6f 6f 02 63 61 00

encode-pair SIP-Server-Domain-Name-List = "foo.ca", SIP-Server-Domain-Name-List = "example.com"
match 00 15 00 15 03 66 6f 6f 02 63 61 00 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00

encode-pair SIP-Server-Domain-Name-List = "www.example.com", SIP-Server-Domain-Name-List = "ftp.example.com"
match 00 15 00 17 03 77 77 77 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 03 66 74 70 c0 04

encode-pair SIP-Server-Domain-Name-List = "www.example.com", SIP-Server-Domain-Name-List = "ftp.example.com", SIP-Server-Domain-Name-List = "ns.example.com"
match 00 15 00 1c 03 77 77 77 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 03 66 74 70 c0 04 02 6e 73 c0 04

#
# This attribute is NOT compressed!
#
Expand All @@ -198,4 +180,4 @@ encode-pair BCMCS-Server-Domain-Name-List = "www.example.com", BCMCS-Server-Doma
match 00 21 00 32 03 77 77 77 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 03 66 74 70 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 02 6e 73 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00

count
match 90
match 80
34 changes: 34 additions & 0 deletions src/tests/unit/dhcpv6_rfc3319.txt
@@ -0,0 +1,34 @@
#
# Test vectors for DHCPv6 attributes for (SIP) Servers
#
load dhcpv6
dictionary-load dhcpv6

#
# 3.1 SIP Servers Domain Name List
#

#
# TLV with single values
#
encode-pair SIP-Server-Domain-Name-List = "foo.ca"
match 00 15 00 08 03 66 6f 6f 02 63 61 00

encode-pair SIP-Server-Domain-Name-List = "foo.ca", SIP-Server-Domain-Name-List = "example.com"
match 00 15 00 15 03 66 6f 6f 02 63 61 00 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00

encode-pair SIP-Server-Domain-Name-List = "www.example.com", SIP-Server-Domain-Name-List = "ftp.example.com"
match 00 15 00 17 03 77 77 77 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 03 66 74 70 c0 04

encode-pair SIP-Server-Domain-Name-List = "www.example.com", SIP-Server-Domain-Name-List = "ftp.example.com", SIP-Server-Domain-Name-List = "ns.example.com"
match 00 15 00 1c 03 77 77 77 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 03 66 74 70 c0 04 02 6e 73 c0 04

#
# 3.2 SIP Servers IPv6 Address List
#

#
# Array of IPv6 addresses
#
encode-pair SIP-Server-Address = 2001:0db8:85a3:0000:0000:8a2e:0370:7334, SIP-Server-Address = 2001:0db8:85a3:0000:0000:8a2e:0370:7335
match 00 16 00 20 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 35

0 comments on commit b630eed

Please sign in to comment.