Age | Commit message (Collapse) | Author |
|
Signed-off-by: Chris Koch <chrisko@google.com>
|
|
server6 object
Signed-off-by: Valerio Santinelli <santinelli@altralogica.it>
|
|
Signed-off-by: Chris Koch <chrisko@google.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
- Race-condition-averse.
- Supports multiple concurrent requests.
- Tested.
- Requires a fully compatible net.PacketConn.
Signed-off-by: Christopher Koch <chrisko@google.com>
|
|
|
|
|