Age | Commit message (Collapse) | Author |
|
Allow the Options type to have getters for each specific options, in
order to avoid users having to cast options to their specific type.
This commit introduces a getter for exactly one option: the
ClientArchType.
i.e. users can replace
archTypes := msg.GetOneOption(OptionClientArchType).(*OptClientArchType)
with
archTypes := msg.Options.ArchTypes()
Because a few message types and options embed options (normal message,
relay message, IANA/IATA option) and each have a restricted set of
options that can be used inside them, we'll introduce at least 3 or more
Options subtypes:
- MessageOptions
- RelayOptions
- IdentityOptions
Perhaps others will join at a later time, such as VendorOptions or
AddressOptions for the IAAddress options field.
Signed-off-by: Chris Koch <chrisko@google.com>
|
|
In both ARP and DHCPv6, the hwtype field is 16bits, and the IANA table
has allocated values >255.
(Bootp however uses 1byte so it can't represent everything)
This was discovered by fuzzing, as it causes round-trip mismatches; eg
with this packet (quoted string):
"0000\x00\x01\x00\x0e\x00\x01000000000000"
Input: 303030300001000e0001303030303030303030303030
Round-trip: 303030300001000e0001003030303030303030303030
^
The upper byte of the hwaddress is set
to 0
Signed-off-by: Anatole Denis <natolumin@unverle.fr>
|
|
From:
r := d.GetOneOption(OptionRouter).(*OptRouter).Routers
d.UpdateOption(&OptRouter{Routers: []net.IP{net.IP{192, 168, 0, 1}}})
To:
r := GetRouter(d.Options)
d.UpdateOption(OptRouter(net.IP{192, 168, 0, 1}, ...))
|
|
|
|
|
|
|
|
|
|
As per https://www.ietf.org/rfc/rfc3633.txt section 16, status code 6 has been reserved for "Delegating router has no prefixes available to assign to the IAPD(s)"
|
|
|
|
|
|
|