summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6
AgeCommit message (Collapse)Author
2020-04-21Generate new TransactionID for RequestTom McPhail
Signed-off-by: Tom McPhail <tom.mcphail@icloud.com>
2020-04-02adding fallback logic to remote id parsingakshay navale
Signed-off-by: akshay navale <akshaynawale@gmail.com>
2020-03-28remove some testsPablo Mazzini
Signed-off-by: Pablo Mazzini <pmazzini@gmail.com>
2020-03-19Added support for a custom logger when instantiating the server4 orValerio Santinelli
server6 object Signed-off-by: Valerio Santinelli <santinelli@altralogica.it>
2020-03-11v6: introduce Prefix optionsChris Koch
IAPD has PDOptions which allows IAPrefix and StatusCode. IAPrefix has PrefixOptions which allow StatusCode. Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-11v6: rename IAPD option to be shorterChris Koch
Also removes superfluous GetOne/Del proxy functions. Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-10dhcpv6 fqdn: fix domain encodingPablo Mazzini
Signed-off-by: Pablo Mazzini <pmazzini@gmail.com>
2020-03-10dhcpv6: add IA_PD to request from advertiseMikael Magnusson
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>
2020-03-09v6: add RemoteID getter to RelayOptionsChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-09v6: getter for InterfaceID on RelayOptionsChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-09v6: add RelayOptions with RelayMsgChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-09Merge branch 'master' into vendorsPablo Mazzini
2020-03-09Merge branch 'master' into write16Pablo Mazzini
2020-03-09Merge branch 'master' into vendorsPablo Mazzini
2020-03-09Merge branch 'master' into write16Pablo Mazzini
2020-03-09Merge branch 'master' into feature/dhcp4-o-dhcp6Pablo Mazzini
2020-03-09v6: add IA AddressOptions (StatusCode only)Chris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-09netconf: use new IANA and IAAddress gettersChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-09v6: add IdentityOptionsChris Koch
IANA and IATA options may contain Status Code and IAAddr options. Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-06dhcp6: fix VendorOpts getterChris Koch
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>
2020-03-06dhcpv6: always write 16-byte IPsChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-06[dhcpv6] More getters for MessageOptionsAndrea Barberio
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>
2020-03-06dhcpv6: add DHCPv4-over-DHCPv6 supportMikael Magnusson
Add message types, options, and modifier for handling DHCPv4-over-DHCPv6. Refer to RFC 7341 Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
2020-03-05nclient6: allow non-rapid responses to RapidSolicitChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-05v6: DomainSearchList getterChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-05v6: add FQDN option getterChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-05v6: add IAPD getterChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-05v6: merge multiple OptionOROsChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-05v6: add BootFileParam getterChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-05v6: add ElapsedTime getterChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-05v6: add BootFileURL getterChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-05v6: add DNS getter (and rename DNSRecursiveNameServer to DNS)Chris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-05v6: simplify GetTransactionIDChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-05v6: RequestedOptions getterChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-05v6: clean up option NIIChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-05v6: Status getter for message optionsChris Koch
Status Code is one of the few options used across many Option types. Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-05v6: add IANA GetterChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-05v6: add ServerID getterChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-05v6: add ClientID getterChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-03-05dhcpv6: intro Getters for OptionsChris Koch
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>
2020-03-04dhcpv6: allow using OptIAPrefix without initializingMikael Magnusson
Set the IPv6 prefix field to zero if the prefix is invalid or not initialized. Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
2020-02-21nclient6: listen on link-local addrChris K
This allows for multi-NIC DHCPv6 in parallel. Otherwise: 2020/02/20 05:01:34 Could not configure eth1 for IPv6: listen udp6 %eth1:546: bind: address already in use 2020/02/20 05:01:34 Could not configure eth4 for IPv6: listen udp6 %eth4:546: bind: address already in use 2020/02/20 05:01:34 Attempting to get DHCPv6 lease on eth2 2020/02/20 05:01:34 Could not configure eth0 for IPv6: listen udp6 %eth0:546: bind: address already in use 2020/02/20 05:01:34 Could not configure eth3 for IPv6: listen udp6 %eth3:546: bind: address already in use Signed-off-by: Chris Koch <chrisko@google.com>
2020-02-06hcpv6 fqdn: implements OptionFQDN optionXuehao (David) Hu
per https://tools.ietf.org/rfc/rfc4704.txt Signed-off-by: Xuehao (David) Hu <xuehaohu@google.com>
2020-01-02v6: give proper names to some common OptionCodesChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-01-02v6: use time.Duration for duration fieldsChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2019-12-12[dhcpv6] Add option BootfileParam to DHCPv6 clientDmitrii Okunev
Added support of option OptBootFileParam. See RFC5970 section 3.2. Signed-off-by: Dmitrii Okunev <xaionaro@fb.com>
2019-11-12[dhcpv6]Adding opt 16 when parsing vendor optionsAkshay Navale
Signed-off-by: Akshay Navale <navale@dhcp-172-27-23-219.dhcp.thefacebook.com>
2019-11-03dhcpv6: Add support for 4RD optionsAnatole Denis
IPv4 Residual Deployment (4RD) is a strategy for providing IPv4 connectivity in IPv6-only networks. The standard includes autoconfiguration via DHCPv6, as described in RFC7600. This adds support for the 3 options defined in that RFC Signed-off-by: Anatole Denis <natolumin@unverle.fr>
2019-11-03dhcpv6: Add all current option codes from IANAAnatole Denis
This updates the option codes list in dhcpv6/types.go to include all published option codes as of today. For better formatting of the table, replace comments indicating undefined options with assignments to the throwaway variable `_`, which avoids resetting alignment formatting compared to the comment option. Signed-off-by: Anatole Denis <natolumin@unverle.fr>
2019-10-08iana: HWType is 16 bitsAnatole Denis
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>