lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1393432763.2316.149.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Wed, 26 Feb 2014 08:39:23 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	David Laight <David.Laight@...LAB.COM>
Cc:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: shutdown()'s 'how' parameter doesn't seem to be used correctly

On Wed, 2014-02-26 at 15:18 +0000, David Laight wrote:
> AFAICT userspace calls shutdown(sock, how) with 'how' set to one of SHUT_RD (0),
> SHUT_WR (1) or SHUT_RDWR(2).
> 
> The kernel code typically wants the bitmask of RCV_SHUTDOWN (1) | SEND_SHUTDOWN (2).
> If you look at the af_unix.c unix_shutdown() there is a comment where it
> add's one in order to do the conversion.
> 
> But I can't find the conversion before tcp_shutdown() or sctp_shutdown()
> checks for 'how & SEND_SHUTDOWN'.
> Which implies that shutdown(sock, SHUT_WR) doesn't work.
> 
> What have I missed?
> Should I be passing 2 or 3 to a direct call to sock->ops->shutdown()?
> (We currently pass 2 - which does outward disconnect anyway).

Take a look at inet_shutdown()



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ