-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better handle group refs to somewhere in the middle of the tree
- Loading branch information
Showing
4 changed files
with
52 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,9 @@ | ||
BEGIN PROTOCOL DHCPv6 3 | ||
|
||
# | ||
# Basic options needed by the DHCPv6 pair encoder and decoder | ||
# | ||
ATTRIBUTE Packet-Type 65536 uint32 internal | ||
ATTRIBUTE Transaction-ID 65537 uint32 internal | ||
ATTRIBUTE test-tlv 6809 tlv | ||
ATTRIBUTE child1 .1 uint32 | ||
ATTRIBUTE child2 .2 uint32 | ||
|
||
ATTRIBUTE Option-Request 65535 uint16 array # Magic option listing requested options | ||
|
||
# | ||
# Test attributes | ||
# | ||
ATTRIBUTE Test-string 1 string | ||
ATTRIBUTE Test-octets 2 octets | ||
|
||
ATTRIBUTE Test-ipaddr 3 ipaddr | ||
ATTRIBUTE Test-ipv4addr 4 ipv4addr | ||
ATTRIBUTE Test-ipv4prefix 5 ipv4prefix | ||
ATTRIBUTE Test-ipv6addr 6 ipv6addr | ||
ATTRIBUTE Test-ipv6prefix 7 ipv6prefix | ||
ATTRIBUTE Test-ifid 8 ifid | ||
ATTRIBUTE Test-ether 11 ether | ||
|
||
ATTRIBUTE Test-bool 12 bool | ||
|
||
ATTRIBUTE Test-uint8 13 uint8 | ||
ATTRIBUTE Test-uint16 14 uint16 | ||
ATTRIBUTE Test-uint32 15 uint32 | ||
ATTRIBUTE Test-uint64 16 uint64 | ||
|
||
ATTRIBUTE Test-int8 17 int8 | ||
ATTRIBUTE Test-int16 18 int16 | ||
ATTRIBUTE Test-int32 19 int32 | ||
ATTRIBUTE Test-int64 20 int64 | ||
|
||
ATTRIBUTE Test-float32 21 float32 | ||
|
||
ATTRIBUTE Test-time-delta 23 time_delta | ||
ATTRIBUTE Test-date 24 date | ||
|
||
ATTRIBUTE Test-size 26 size | ||
|
||
ATTRIBUTE Test-tlv 27 tlv | ||
ATTRIBUTE Test-struct 28 struct | ||
|
||
ATTRIBUTE Test-vsa 30 vsa | ||
ATTRIBUTE Test-group 32 group | ||
ATTRIBUTE test-group 6810 group ref=test-tlv | ||
|
||
END-PROTOCOL DHCPv6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# -*- text -*- | ||
# Copyright (C) 2019 Network RADIUS SARL ([email protected]) | ||
# This work is licensed under CC-BY version 4.0 https://creativecommons.org/licenses/by/4.0 | ||
# | ||
# Version $Id$ | ||
# | ||
|
||
proto dhcpv6 | ||
proto-dictionary dhcpv6 | ||
load-dictionary dictionary | ||
fuzzer-out dhcpv6 | ||
|
||
pair test-group = { child1 = 1 } | ||
match test-group = { child1 = 1 } | ||
|
||
|
||
encode-pair test-group = { child1 = 1 } | ||
match 1a 9a 00 0c 1a 99 00 08 00 01 00 04 00 00 00 01 | ||
|
||
# | ||
# Yeah, this is wrong. The decoder can only handle group refs which | ||
# point to the top of the tree. | ||
# | ||
# @todo - fix it! | ||
# | ||
decode-pair - | ||
match test-group = { = { child1 = 1 } } | ||
|
||
count | ||
match 10 |