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>] [day] [month] [year] [list]
Date:	Tue, 2 Dec 2008 20:57:45 +0200
From:	Rémi Denis-Courmont <rdenis@...phalempin.com>
To:	netdev@...r.kernel.org
Subject: EOF and zero-length packets?

	Hello,

When dealing with SOCK_STREAM sockets, a zero read means the other side has 
shut down the connection, and there will be no more incoming data.

When dealing with SOCK_DGRAM/SOCK_RAW sockets, a zero read means we got an 
empty packet, and we should keep on reading.

What about SOCK_DCCP? It seems both scenarios yield zero, which is, hmm, 
problematic from userland. Is checking for POLLHUP in revents the recommended 
disambiguation? that seems a bit backward to me :(

-- 
Rémi Denis-Courmont
http://www.remlab.net/
--
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