# HG changeset patch # User Roy Marples # Date 1589906689 0 # Node ID 40c8b6fa20338497178814176f9a23b6e6453986 # Parent 23363945d9a110bd09fd7003fa7e17a4429ea878 Linux: workaround a kernel bug when sending DHCPv6 over SOCK_RAW The equivalent works fine for DHCP messages, so hum ho. diff -r 23363945d9a1 -r 40c8b6fa2033 src/dhcp6.c --- a/src/dhcp6.c Tue May 19 16:13:06 2020 +0000 +++ b/src/dhcp6.c Tue May 19 16:44:49 2020 +0000 @@ -1209,7 +1209,12 @@ bool broadcast = true; struct sockaddr_in6 dst = { .sin6_family = AF_INET6, + /* Setting the port on Linux gives EINVAL when sending. + * This looks like a kernel bug as the equivalent works + * fine with the DHCP counterpart. */ +#ifndef __linux__ .sin6_port = htons(DHCP6_SERVER_PORT), +#endif }; struct udphdr udp = { .uh_sport = htons(DHCP6_CLIENT_PORT),