summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2021-08-27dhcpv4: Add RelaySourcePortSubOption constantAnatole Denis
As described in RFC8357 this is a 0-length suboption used to indicate that the relay supports the arbitrary UDP port behavior from RFC8357 Since this is 0-length the constant is enough to handle the full behavior Signed-off-by: Anatole Denis <natolumin@unverle.fr>
2021-08-26Adding support to parse vendor data for cisco firepower (#443)Hariharakumar Narasimhakumar
* Adding support to parse vendor data for cisco firepower
2021-08-17Fix a bug in MessageOptions.NTPServersDeomid "rojer" Ryabkov
Added a unit test Signed-off-by: Deomid "rojer" Ryabkov <rojer9@fb.com>
2021-08-17Add NTPServers to NetConfDeomid "rojer" Ryabkov
Signed-off-by: Deomid "rojer" Ryabkov <rojer9@fb.com>
2021-08-13Added OptNTPServerAndrea Barberio
Signed-off-by: Andrea Barberio <insomniac@slackware.it>
2021-08-12[interfaces] bsd #2Pablo Mazzini
2021-08-11[interfaces] bsdPablo Mazzini
2021-08-09[interfaces] darwin (#423)Pablo Mazzini
2021-08-09netboot: DNS not mandatoryPablo Mazzini
2021-06-21Make server6 package compile on Windows (#431)Erik G
Signed-off-by: Erik G <erik.geiser@netaachen.de>
2021-06-08Make server4 package compile on Windows (#428)Guillaume Rose
2021-05-28Break circular dependency on u-rootChris Koch
u-root -> dhcp -> u-root is the circular dependency. Which is fine, except we messed up modules in u-root big time. We need to break the circular dep for now. Signed-off-by: Chris Koch <chrisko@google.com>
2021-04-28[dhcpv4] remove NewOffer commentPablo Mazzini
2021-04-27Add dhcp Opt 124(vivc) parsing to ztp (#425)Hariharakumar Narasimhakumar
* Add dhcp Opt 124(vivc) parsing to ztp Signed-off-by: Hariharakumar Narasimhakumar <hhkumar@fb.com>
2021-04-20rearrange parse_circuitid test cases (#419)Hariharakumar Narasimhakumar
Signed-off-by: Hariharakumar Narasimhakumar <hhkumar@fb.com> Co-authored-by: Hariharakumar Narasimhakumar <hhkumar@fb.com>
2021-04-20Adding xe interface format for Juniper qfx to list of circuit regexes (#418)Hariharakumar Narasimhakumar
* Adding xe interface format for Juniper qfx to list of circuit regexes Signed-off-by: Hariharakumar Narasimhakumar <hhkumar@fb.com> * Consolidating regexes for et and xe into one entry Signed-off-by: Hariharakumar Narasimhakumar <hhkumar@fb.com> Co-authored-by: Hariharakumar Narasimhakumar <hhkumar@fb.com>
2021-03-15Switch to GitHub ActionsAndrea Barberio
TravisCI not supported anymore. Signed-off-by: Andrea Barberio <insomniac@slackware.it>
2021-03-14nclient4: fix buildChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2021-03-13nclient4: Ensure server identifier matches (#410)Moritz Fischer
Ensure server identifier matches the offer server identifier when looking for ACKs or NAKs. This protects against rogue DHCP servers NAKing requests the shouldn't. Signed-off-by: Moritz Fischer <moritzf@google.com> Co-authored-by: Moritz Fischer <moritzf@google.com>
2021-03-10Improve ipv4 compatibilityEugene Burkov
Signed-off-by: Eugene Burkov <e.burkov@adguard.com>
2021-03-06Fix tests to match the change packetMarcel Moolenaar
Signed-off-by: Marcel Moolenaar <mmoolena@amazon.com>
2021-03-06Pad packets after the 'end' option to be more conformantMarcel Moolenaar
RFC 2131 gives two examples of padding in section 4.1. For both the examples, the 'end' option preceeds the padding with the 'pad' option. These examples relate to overloading pre-defined fields for options, not padding the packet for a minimal size. Older versions of the U-Boot firmware support DHCP, but do not expect the 'pad' option. The firmware logs the following warning for each occurence: *** Unhandled DHCP Option in OFFER/ACK: 0 This warning disappears when the 'end' option preceeds the 'pad' option. Signed-off-by: Marcel Moolenaar <mmoolena@amazon.com>
2021-01-20nclient4: WithUnicast default port should be 68 (#403)Canwu Yao
Signed-off-by: yaocw2020 <yaocanwu@gmail.com>
2020-11-12netboot: use latest rtnl apiPablo Mazzini
Signed-off-by: Pablo Mazzini <pmazzini@gmail.com>
2020-09-22Merge pull request #393 from hujun-open/masterPablo Mazzini
fix some debug output issues
2020-09-20- rename raiValue to raiSubOptionValue to avoid confusion, and move it next ↵Hu Jun
to raiSubOptionCode - a few minor changes to address latest feedback Signed-off-by: Hu Jun <hujun.work@gmail.com>
2020-09-20Merge branch 'master' of https://github.com/insomniacslk/dhcpHu Jun
2020-09-16nclients: export serverAddr and ifaceHWAddrChris Koch
For any users to write their own Discover or Request methods, they need access to the ifaceHWAddr and serverAddr. Discovered while trying to move pinterest/bender to nclients. Signed-off-by: Chris Koch <chrisko@google.com>
2020-09-16nclient4: respect NAKsChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-09-16nclient4: remove unused functionsChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-09-16docs: fix package commentsChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-09-16dhcp: add go.mod fileChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-09-16nclient4: unexport unnecessarily exported symbolsChris Koch
Signed-off-by: Chris Koch <chrisko@google.com>
2020-09-16Add Additional IANA Architecture TypesBenjamin S. Allen
Adds the additional architecture types as defined by IANA http://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#processor-architecture. Note, RFC4578 errata, https://www.rfc-editor.org/errata_search.php?rfc=4578 "The values for EFI BC and EFI x86-64 should be swapped. UEFI implementations use value 7 to report EFI x86-64, not value 9." IANA's list also agrees with this swap. Thus I've swapped these values here to match. I took some liberty with the new architecture's mnemonic names compared to the descriptions from IANA. This was an attempt to standardize wording, capitalization, and match the existing style. Signed-off-by: Benjamin S. Allen <bsallen@alcf.anl.gov>
2020-09-05- restore OptionGeneric.String()Hu Jun
- add raiValue in option_relay_agent_information.go to implement fmt.Stringer - change test cases accordingly Signed-off-by: Hu Jun <hujun.work@gmail.com>
2020-08-31- fixed some test cases broken by this PRHu Jun
- add a space in OptionGeneric.String() - move the indenting "\n" from OptionHumanizer.Stringify to RelayOptions.String() Signed-off-by: Hu Jun <hujun.work@gmail.com>
2020-08-31Merge branch 'master' of https://github.com/insomniacslk/dhcpHu Jun
2020-08-14Merge pull request #394 from mcphailtom/opt_information_refreshPablo Mazzini
Option: Information Refresh Time https://tools.ietf.org/html/rfc8415
2020-08-13Added structure, parsing and convenience fuctions for ↵Tom McPhail
OptInformationRefreshTime (32) https://tools.ietf.org/html/rfc8415#section-21.23 Signed-off-by: Tom McPhail <tom.mcphail@icloud.com>
2020-08-13Merge pull request #392 from pmazzini/macPablo Mazzini
ExtractMAC: use option 79
2020-08-09- fix relayHumanizer.CodeHumanizer so it uses raiSubOptionCodeHu Jun
- update OptionHumanizer.Stringify so it include an additional newline for option82 - update OptionGeneric.String so it include a string output in addition to existing byte slice output Signed-off-by: Hu Jun <hujun.work@gmail.com>
2020-08-08ExtractMAC: use option 79Pablo Mazzini
2020-08-06dhcpv6: Handle IA_TA optionsAnatole Denis
This creates support for IA_TA options, based on and reusing the blocks from IA_NA, to which it is extremely similar Signed-off-by: Anatole Denis <natolumin@unverle.fr>
2020-08-02Merge pull request #386 from hujun-open/dhcpv4_releasePablo Mazzini
add lease&release support for nclient4
2020-07-18- change to WithOptionCopied in NewReleaseFromACKHu Jun
Signed-off-by: Hu Jun <hujun.work@gmail.com>
2020-07-18move NewReleaseFromAck to where all NewXXFromYY areHu Jun
Signed-off-by: Hu Jun <hujun.work@gmail.com>
2020-07-17fix doc of NewReleaseFromACKHu Jun
Signed-off-by: Hu Jun <hujun.work@gmail.com>
2020-07-17- change NewRleaseFromLease to NewRleaseFromACK, and move it to dhcpv4Hu Jun
Signed-off-by: Hu Jun <hujun.work@gmail.com>
2020-07-16- remove Lease.IDOptions and update corresponding struct / functionHu Jun
- add NewReleaseFromLease and update Client.Release() accordingly - update lease_test.go accordingly - remove example_lease_test.go Signed-off-by: Hu Jun <hujun.work@gmail.com>
2020-07-14- fix a lint error in lease.goHu Jun
- fix a data race in lease_test.go Signed-off-by: Hu Jun <hujun.work@gmail.com>