net/dhcp6: dhcp6s on 11.0 exits because of shutdown on non-connected UDP socket

Guy Yur guyyur at gmail.com
Tue Apr 11 14:27:36 UTC 2017


Hello Hiroki,

When running dhcp6s from net/dhcp6 on 11.0 it exits with:
dhcp6s[678]: shutdown(outbound, 0): Socket is not connected

dhcp6s tries to call shutdown() on a non-connected UDP socket
which returns an error after r285910.

rtsol/rtsold were changed to not call shutdown() in r286566.
dhcp6s should also be changed to either exclude the shutdown
call on FreeBSD or to remove the shutdown() call completely.

Relevant code:
dhcp6s.c: server6_init()

-#if !defined(__linux__) && !defined(__sun__)
+#if !defined(__linux__) && !defined(__sun__) && !defined(__FreeBSD__)
    /* make the socket write-only */
    if (shutdown(outsock, 0)) {
        d_printf(LOG_ERR, FNAME, "shutdown(outbound, 0): %s",
            strerror(errno));
        exit(1);
    }

Thanks,
Guy


More information about the freebsd-ports mailing list