Age | Commit message (Collapse) | Author |
|
Signed-off-by: Hu Jun <hujun.work@gmail.com>
|
|
Signed-off-by: Hu Jun <hujun.work@gmail.com>
|
|
dhcpv4_release
|
|
When parsing a route option with a mask size >32, there would be a panic
at option_routes.go:47 as user-supplied data is used without
verification for a slice bound, causing a read of masksize/8, whic is
possibly >4 bytes. Instead reject the invalid route
Signed-off-by: Anatole Denis <natolumin@unverle.fr>
|
|
When there was a 0-length generic option, it would be omitted.
Rapid commit (option 80) is a 0-length option with a length tag.
There could also be 0-length options in the vendor extensions, and the
RFC states that they should be written out:
> Any options defined subsequent to this document should contain a
> length octet even if the length is fixed or zero.
Signed-off-by: Anatole Denis <natolumin@unverle.fr>
|
|
There is a special case for when ClientHwAddr is empty, which seems to
only apply when creating a packet with New(), which defaults to
HWType==Ethernet but doesn't assign the ClientHwAddr field.
All the other New*() constructors assign a hardware address and don't
use this codepath
Remove this special case and instead make New() generate an
almost-correct packet in the first place, so that ToBytes() can stay
more generic
Signed-off-by: Anatole Denis <natolumin@unverle.fr>
|
|
When BootFileName is longer than 128 bytes or ServerHostName is longer
than 64 bytes, trying to null-terminate the strings when writing out the
packet causes a panic.
Since the ToBytes() function cannot return errors, silently truncate the
string instead (we do the same with ClientHWAddr if it is longer than 16
bytes for example)
Signed-off-by: Anatole Denis <natolumin@unverle.fr>
|
|
Those 2 tests did the exact same thing: check that an invalid packet
raises an error when parsed. Merge them into the same test, so that we
can easily add more test cases to the list
Signed-off-by: Anatole Denis <natolumin@unverle.fr>
|
|
Signed-off-by: Anatole Denis <natolumin@unverle.fr>
|
|
Signed-off-by: Hu Jun <hujun.work@gmail.com>
|
|
- fix a few more lint complains
Signed-off-by: Hu Jun <hujun.work@gmail.com>
|
|
Signed-off-by: Hu Jun <hujun.work@gmail.com>
|
|
Signed-off-by: Hu Jun <hujun.work@gmail.com>
|
|
Add Client Link-Layer Address option for RFC6939 support
|
|
|
|
Signed-off-by: Pablo Mazzini <pmazzini@gmail.com>
|
|
Signed-off-by: Tom McPhail <tom.mcphail@icloud.com>
|
|
Signed-off-by: Tom McPhail <tom.mcphail@icloud.com>
|
|
Signed-off-by: akshay navale <akshaynawale@gmail.com>
|
|
Signed-off-by: Pablo Mazzini <pmazzini@gmail.com>
|
|
Support for custom logger in servers
|
|
Signed-off-by: Pablo Mazzini <pmazzini@gmail.com>
|
|
server6 object
Signed-off-by: Valerio Santinelli <santinelli@altralogica.it>
|
|
IAPD has PDOptions which allows IAPrefix and StatusCode.
IAPrefix has PrefixOptions which allow StatusCode.
Signed-off-by: Chris Koch <chrisko@google.com>
|
|
Also removes superfluous GetOne/Del proxy functions.
Signed-off-by: Chris Koch <chrisko@google.com>
|
|
Signed-off-by: Chris Koch <chrisko@google.com>
|
|
Signed-off-by: Pablo Mazzini <pmazzini@gmail.com>
|
|
dhcpv6: add IA_PD to request from advertise
|
|
Add the IA_PD option to the request from the advertise if present.
Add WithIAPD() as modifier and test.
Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
|
|
Signed-off-by: Chris Koch <chrisko@google.com>
|
|
Signed-off-by: Chris Koch <chrisko@google.com>
|
|
Signed-off-by: Chris Koch <chrisko@google.com>
|
|
dhcp6: fix VendorOpts getter
|
|
|
|
dhcpv6: always write 16-byte IPs
|
|
|
|
|
|
dhcpv6: add DHCPv4-over-DHCPv6 support
|
|
|
|
|
|
fix travis: run rtr7 checks on Go > 1.12
|
|
Signed-off-by: Pablo Mazzini <pmazzini@gmail.com>
|
|
|
|
|
|
Signed-off-by: Chris Koch <chrisko@google.com>
|
|
Signed-off-by: Chris Koch <chrisko@google.com>
|
|
IANA and IATA options may contain Status Code and IAAddr options.
Signed-off-by: Chris Koch <chrisko@google.com>
|
|
RFC 8415 Section 21.17 states it may appear more than once:
Multiple instances of the Vendor-specific Information option may
appear in a DHCP message. Each instance of the option is interpreted
according to the option codes defined by the vendor identified by the
Enterprise Number in that option. Servers and clients MUST NOT send
more than one instance of the Vendor-specific Information option with
the same Enterprise Number.
Signed-off-by: Chris Koch <chrisko@google.com>
|
|
Signed-off-by: Chris Koch <chrisko@google.com>
|
|
Added IAAddress, OneIAAddress, UserClasses, VendorOpts, and changed
Options to MessageOptions in IA_NA and IA_Address options.
Signed-off-by: Andrea Barberio <insomniac@slackware.it>
|