summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/server6/server.go
AgeCommit message (Collapse)Author
2020-09-16docs: fix package commentsChris Koch
Signed-off-by: Chris Koch <chrisko@google.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>
2019-09-25server6: allow nil IP in addition to unspecifiedChris K
Signed-off-by: Chris Koch <chrisko@google.com>
2019-09-18server6: Create UDP conn manually for more controlAnatole Denis
Similar to server4 where the UDP connection is manually created using the socket interfaces, this creates a connection with adequate options: * SO_BINDTODEVICE or equivalent if an interface is requested * V6ONLY when supported by the operating system * Allows binding to a multicast address specifically instead of falling back to wildcard Signed-off-by: Anatole Denis <natolumin@unverle.fr>
2019-09-17server6: Fix listening on multicast addressesAnatole Denis
Joining a multicast group with an address that can't be received on a socket is ineffective, at least on linux. This updates the logic of NewServer in a mostly backwards-compatible way, to enable listening on arbitrary multicast addresses: * Unicast addresses see no user-visible change, but don't join a multicast group for which they don't receive traffic anyway * Multicast addresses start actually receiving traffic for the group they represent, and don't join the default group. **this is a behaviour change**: previously they would receive traffic for the default group if it was on the same port and **not** for the group they represent. I consider that previous behaviour a bug * Wildcard addresses, if on the proper port, will join both AllDHCPRelayAgentsAndServers and AllDHCPServers **this is a behaviour change**: previously only AllDHCPRelayAgentsAndServers was joined * Wildcard addresses on another port: no visible change, same as unicast case Signed-off-by: Anatole Denis <natolumin@unverle.fr>
2019-04-29[server6] Server should join multicast addressAndrea Barberio
The previous logic was wrong - there's no "listening" on multicast address, the server should listen on the given address, and join the multicast group. This PR fixes it. Also moved the multicast addresses to a common package. Tested with unit/integ tests, and with coredhcp. Signed-off-by: Andrea Barberio <insomniac@slackware.it>
2019-04-17[server] Serve returns an error, and closes when doneAndrea Barberio
Server6 and Server4 had Serve methods that return without reporting an error, changed in this PR. Serve now also closes the connection when done. Signed-off-by: Andrea Barberio <insomniac@slackware.it>
2019-04-04client6: new async DHCPv6 client like #250.Christopher Koch
- Race-condition-averse. - Supports multiple concurrent requests. - Tested. - Requires a fully compatible net.PacketConn. Signed-off-by: Christopher Koch <chrisko@google.com>
2019-01-28Created examples directory and adjusted READMEAndrea Barberio
2019-01-28dhcpv6: moved client into dhcpv6/client6Andrea Barberio