diff options
author | Anatole Denis <natolumin@unverle.fr> | 2019-10-03 22:51:19 +0200 |
---|---|---|
committer | Anatole Denis <natolumin@unverle.fr> | 2019-10-08 08:56:49 +0200 |
commit | 2943f69fe4277297a362c156611e9ccc712e834b (patch) | |
tree | 69405fbefbda5374451c6a5090a621009b69d025 /iana | |
parent | 1d9062326df943510ecaff2be53bd630a419b684 (diff) |
iana: HWType is 16 bits
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>
Diffstat (limited to 'iana')
-rw-r--r-- | iana/hwtypes.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/iana/hwtypes.go b/iana/hwtypes.go index bbb3188..e6fb38b 100644 --- a/iana/hwtypes.go +++ b/iana/hwtypes.go @@ -1,7 +1,7 @@ package iana // HWType is a hardware type as per RFC 2132 and defined by the IANA. -type HWType uint8 +type HWType uint16 // See IANA for values. const ( |