Skip to content

Commit 27b66a5

Browse files
[#3404] RFC3594, RFC3634 tests
- implemented tests for sub-options 9 and 10
1 parent 3f37999 commit 27b66a5

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/lib/dhcp/tests/libdhcp++_unittest.cc

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2959,6 +2959,9 @@ TEST_F(LibDhcpTest, stdOptionDefs4) {
29592959
TEST_F(LibDhcpTest, ccc) {
29602960
// CCC (CableLabs Client Config) options for cable modems
29612961
const unsigned char ccc_data[] = {
2962+
2963+
// RFC3495 sub-opts
2964+
29622965
// opt 1: TSP's primary DHCP address 161.162.163.164
29632966
0x01, 0x04, 0xa1, 0xa2, 0xa3, 0xa4,
29642967

@@ -2987,9 +2990,18 @@ TEST_F(LibDhcpTest, ccc) {
29872990

29882991
// sub-option 8, TSP's Provisioning Timer Sub-Option
29892992
// timer value = 100
2990-
0x08, 0x01, 0x64
2993+
0x08, 0x01, 0x64,
2994+
2995+
// RFC 3594 sub-option (9)
2996+
2997+
// sub-option 9, Security Ticket Control, set bits 0 (PacketCable
2998+
// Provisioning Server used by the CCD) and 1 (the group of all
2999+
// PacketCable Call Management Servers used by the CCD)
3000+
0x09, 0x02, 0x0, 0x03,
29913001

2992-
// todo: 3
3002+
// RFC 3634 (sub-option 10), Key Distrbution Center, two KDC servers
3003+
// configured: 1.2.3.4, 17.18.19.20
3004+
0x0a, 0x08, 0x01, 0x02, 0x03, 0x04, 0x11, 0x12, 0x13, 0x14
29933005
};
29943006
std::vector<uint8_t> ccc_buf(ccc_data, ccc_data + sizeof(ccc_data));
29953007

0 commit comments

Comments
 (0)