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
| ||
|
Message-Id: <200707141938.12028@auguste.remlab.net> Date: Sat, 14 Jul 2007 19:38:11 +0300 From: Rémi Denis-Courmont <rdenis@...phalempin.com> To: Daniel Schaffrath <daniel.schaffrath@....com> Cc: linux-net@...r.kernel.org, Linux NetDev <netdev@...r.kernel.org> Subject: Re: No cmsg for SOCK_STREAM? Le samedi 14 juillet 2007, Daniel Schaffrath a écrit : > 'man 7 ip' sais that IP_RECVOPTS is not supported for SOCK_STREAM > sockets. > > But what if for debugging/measuring purposes I wanted to record the > route of the datagrams containing the stream segments? Are there any > other ways to get the IP options? Like a second raw socket to deliver > cmsgs to user space and later resubmit for kernel TCP processing and > normal delivery to application -- if that is possible at all. The STREAM does not return data on a per-packet basis, so it would be total non-sense to have IP_RECVOPTS on STREAM sockets. What would the kernel do when there is re-assembly before delivery to userland, or if a retransmitted segment has different options?! FYI, the "advanced" socket API (for IPv6) consistently notes that sending/receiving IP(v6) options per-packet is only defined for DGRAM and RAW sockets. You have to raw sockets, or better yet, BPF to do this. -- 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