--- Comment #9 from Jonathan T. Looney <j...@freebsd.org> ---
My best guess is that this is due to a new check in soshutdown() added in
2351 if ((so->so_state &
2352 (SS_ISCONNECTED | SS_ISCONNECTING | SS_ISDISCONNECTING)) ==
2354 * POSIX mandates us to return ENOTCONN when
2355 * invoked on a datagram sockets, however historically
2356 * actually tear socket down. This is known to be
2357 * some applications to unblock process waiting in
2358 * by other process that it shares that socket with.
Try to meet
2359 * both backward-compatibility and POSIX requirements
2360 * ENOTCONN but still asking protocol to perform
2362 if (so->so_type != SOCK_DGRAM)
2363 return (ENOTCONN);
2364 soerror_enotconn = 1;
I don't think I ever really considered someone calling shutdown() on a
listening socket. I would have expected them to use close(). My guess is that
whoever added this didn't consider that case, either.
FWIW, this check was added in r285910.
I suppose the simple fix is to add a check for SOLISTENING(so) (head) or
so->so_options & SO_ACCEPTCON (stable/11). However, we should consult with
someone to see what POSIX requires in this case.
You are receiving this mail because:
You are the assignee for the bug.
email@example.com mailing list
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"