summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/dhcpv6_test.go
AgeCommit message (Collapse)Author
2019-05-08Addressed various linter warningsAndrea Barberio
Mostly for dead code and potentially wrong comparisons. Signed-off-by: Andrea Barberio <insomniac@slackware.it>
2019-05-02[dhcpv6] Handle SOLICIT with rapid commit in NewReplyFromMessageAndrea Barberio
NewReplyFromMessage creates a reply from a message. With this patch it can handle Solicit messages with rapid-commit. RFC3315 states that: ``` If the client has included a Rapid Commit option in its Solicit message, the client terminates the waiting process as soon as a Reply message with a Rapid Commit option is received. ``` Signed-off-by: Andrea Barberio <insomniac@slackware.it>
2019-04-24[dhcpv6] Solicit messages derive default IAID from MAC addressAndrea Barberio
IAID must be set by the client. This patch generates the IAID from the MAC address of the interface. To do so, a new WithIAID modifier is added, the interface of NewSolicitWithCID now requires a hwaddr parameter, and NewAdvertiseFromSolicit copies the IA_NA option from the solicit if present. Signed-off-by: Andrea Barberio <insomniac@slackware.it>
2019-04-23Revert "[dhcpv6] Solicit messages derive default IAID from MAC address"Andrea Barberio
This reverts commit b071bdc86a58037f6c745647c97fca202f3caef9. Signed-off-by: Andrea Barberio <insomniac@slackware.it>
2019-04-23[dhcpv6] Solicit messages derive default IAID from MAC addressAndrea Barberio
IAID must be set by the client. This patch generates the IAID from the MAC address of the interface. To do so, a new WithIAID modifier is added, the interface of NewSolicitWithCID now requires a hwaddr parameter, and NewAdvertiseFromSolicit copies the IA_NA option from the solicit if present. Signed-off-by: Andrea Barberio <insomniac@slackware.it>
2019-04-03Use cancellable crypto RNG from u-rootAndrea Barberio
Fixes #246 Signed-off-by: Andrea Barberio <insomniac@slackware.it>
2019-03-11dhcpv6: remove setters and getters.Christopher Koch
- Make members directly accessible.
2019-03-11dhcpv6: rename stuttering types.Christopher Koch
dhcpv6.DHCPv6Message -> dhcpv6.Message dhcpv6.DHCPv6Relay -> dhcpv6.RelayMessage
2019-01-26dhcpv6: move option code and length marshaling to Options.ToBytes.Christopher Koch
2019-01-26dhcpv6: introduce TransactionID typeChristopher Koch
2019-01-14iana: rename HwTypeType to HWType, add package comment.Christopher Koch
2019-01-14Rename iana.ArchType to iana.Arch.Christopher Koch
2018-11-27Removed ineffective assignmentAndrea Barberio
2018-11-27Test TransactionID generationMikołaj Walczak
2018-11-26Add missing error check in GenerateTransactionIDMikołaj Walczak
2018-09-12NewReplyFromDHCPv6Message: reply to information requestPablo Mazzini
2018-08-13rebasePablo Mazzini
2018-08-12IsOptionRequested method of DHCPv6MessagePablo Mazzini
2018-08-10rename IsRequested to IsRequestedOptionPablo Mazzini
2018-07-30DHCPv6: Rename Option constants to CamelCaseSean Karlage
To appease linters
2018-07-29DHCPv6: Fix message type constantsSean Karlage
Renames DHCPv6 constants for message types to CamelCase
2018-07-14Merge pull request #83 from pmazzini/masterinsomniac
add DecapsulateRelayIndex
2018-07-14return error if index < -1Pablo Mazzini
2018-07-14add DecapsulateRelayIndexPablo Mazzini
2018-07-14extend DecapsulateRelayPablo Mazzini
2018-07-11NewSolicitWithCID for DHCPv6 (#76)Mikołaj Walczak
2018-07-08add NewReplyFromDHCPv6Message (#78)Pablo Mazzini
Add a more generic NewReplyFromMessage to avoid code duplication. This is one step closer towards fixing issue #73. Leave NewReplyFromRequest, NewReplyFromRenew and NewReplyFromRebind for backwards compatibility.
2018-06-11add NewReplyFromRenew and NewReplyFromRebind (#72)Pablo Mazzini
2018-04-30add NewReplyFromRequest (#51)Pablo Mazzini
2018-04-30add NewAdvertiseFromSolicit (#50)Pablo Mazzini
add NewAdvertiseFromSolicit
2018-04-20dhcpv6: added modifiers (#41)insomniac
dhcpv6: added modifiers Added support for packet modifiers, i.e. functions that can arbitrarily manipulate a DHCPv6 packet. These modifiers are used by NewMessage, NewSolicitForInterface, NewRequestForAdvertise, and can be used by other packet creation functions. A bunch of sample modifiers have been added under modifiers.go , too. With the introduction of modifiers I also removed some options that should not necessarily be in a standard DHCPv6 message.
2018-03-06Refactor tests to use stretchr/testify/requireSean Karlage
2017-12-07Refactored options into the dhcpv6 package to resolve circular imports. Sadly.Andrea Barberio
2017-12-06DHCPv6 is now an interface; DHCPv6Message and DHCPv6RelayMessage are ↵Andrea Barberio
implementations
2017-12-05Initial commitAndrea Barberio