Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Apr 2017 17:27:33 +0300
From:      Guy Yur <guyyur@gmail.com>
To:        hrs@freebsd.org, freebsd-ports@freebsd.org
Subject:   net/dhcp6: dhcp6s on 11.0 exits because of shutdown on non-connected UDP socket
Message-ID:  <CAC67Hz_ycFSGU%2B2HXjSQrS-_R6vTdki=565Thr5Sgv6YqKARKg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAC67Hz_ycFSGU%2B2HXjSQrS-_R6vTdki=565Thr5Sgv6YqKARKg>