Re: svn: head/sys/netinet
On 12/30/2011 11:52 PM, Kostik Belousov wrote: On Fri, Dec 30, 2011 at 04:25:09PM -0800, Maxim Sobolev wrote: On 12/30/2011 4:17 PM, Maxim Sobolev wrote: M Won't this break whole lot of third-party software, which expects M FreeBSD to be slightly different in this regards? Just curious. Yes it does. And until FreeBSD 10.0-RELEASE there is time to fix this software (at least in ports). The MFC to stable/9 of r226105 was back out. Well, I am just curious how critical it is to get it resolved and is there any way to avoid ABI breakage. Software compiled for 9.x won't run on 10.x even when fitted with the proper compat libs, as far as I can tell and not all software can be easily recompiled. P.S. It should be trivial to put some COMPAT_8/COMPAT_9 shims based on the version of the ELF image (i.e. detect if the binary is than FreeBSD 10. What exactly do you mean by 'version of the ELF image' ? ABI note tag ? What do you propose to do if older call comes from dso, or a library statically linked in the main binary ? Well, 9.x binary would be linked to 9.x library and vice versa. So I don't see any problems either way. [ssp-root@jood1 /home/ssp]$ file /bin/sh /bin/sh: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 8.2 (802510), stripped Technically yes, 10.x binary can open 9.x DSO and we won't know, but I don't think this situation would happen in real life. -Maxim ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn: head/sys/netinet
Won't this break whole lot of third-party software, which expects FreeBSD to be slightly different in this regards? Just curious. -Maxim On 10/7/2011 6:43 AM, Andre Oppermann wrote: Author: andre Date: Fri Oct 7 13:43:01 2011 New Revision: 226105 URL: http://svn.freebsd.org/changeset/base/226105 Log: Add back the IP header length to the total packet length field on raw IP sockets. It was deducted in ip_input() in preparation for protocols interested only in the payload. On raw sockets the IP header should be delivered as it at came in from the network except for the byte order swaps in some fields. This brings us in line with all other OS'es that provide raw IP sockets. Reported by: Matthew Cini Sarreomcins1-at-gmail.com MFC after: 3 days Modified: head/sys/netinet/raw_ip.c Modified: head/sys/netinet/raw_ip.c == --- head/sys/netinet/raw_ip.c Fri Oct 7 13:16:21 2011(r226104) +++ head/sys/netinet/raw_ip.c Fri Oct 7 13:43:01 2011(r226105) @@ -289,6 +289,13 @@ rip_input(struct mbuf *m, int off) last = NULL; ifp = m-m_pkthdr.rcvif; + /* +* Add back the IP header length which was +* removed by ip_input(). Raw sockets do +* not modify the packet except for some +* byte order swaps. +*/ + ip-ip_len += off; hash = INP_PCBHASH_RAW(proto, ip-ip_src.s_addr, ip-ip_dst.s_addr, V_ripcbinfo.ipi_hashmask); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn: head/sys/netinet
On Fri, Dec 30, 2011 at 11:23:45AM -0800, Maxim Sobolev wrote: M Won't this break whole lot of third-party software, which expects M FreeBSD to be slightly different in this regards? Just curious. Yes it does. And until FreeBSD 10.0-RELEASE there is time to fix this software (at least in ports). The MFC to stable/9 of r226105 was back out. M -Maxim M M On 10/7/2011 6:43 AM, Andre Oppermann wrote: M Author: andre M Date: Fri Oct 7 13:43:01 2011 M New Revision: 226105 M URL: http://svn.freebsd.org/changeset/base/226105 M M Log: M Add back the IP header length to the total packet length field on M raw IP sockets. It was deducted in ip_input() in preparation for M protocols interested only in the payload. M M On raw sockets the IP header should be delivered as it at came in M from the network except for the byte order swaps in some fields. M M This brings us in line with all other OS'es that provide raw M IP sockets. M M Reported by: Matthew Cini Sarreomcins1-at-gmail.com M MFC after: 3 days M M Modified: M head/sys/netinet/raw_ip.c M M Modified: head/sys/netinet/raw_ip.c M == M --- head/sys/netinet/raw_ip.c Fri Oct 7 13:16:21 2011 (r226104) M +++ head/sys/netinet/raw_ip.c Fri Oct 7 13:43:01 2011 (r226105) M @@ -289,6 +289,13 @@ rip_input(struct mbuf *m, int off) M last = NULL; M M ifp = m-m_pkthdr.rcvif; M + /* M + * Add back the IP header length which was M + * removed by ip_input(). Raw sockets do M + * not modify the packet except for some M + * byte order swaps. M + */ M + ip-ip_len += off; M M hash = INP_PCBHASH_RAW(proto, ip-ip_src.s_addr, M ip-ip_dst.s_addr, V_ripcbinfo.ipi_hashmask); M M -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn: head/sys/netinet
On 12/30/2011 12:02 PM, Gleb Smirnoff wrote: On Fri, Dec 30, 2011 at 11:23:45AM -0800, Maxim Sobolev wrote: M Won't this break whole lot of third-party software, which expects M FreeBSD to be slightly different in this regards? Just curious. Yes it does. And until FreeBSD 10.0-RELEASE there is time to fix this software (at least in ports). The MFC to stable/9 of r226105 was back out. Well, I am just curious how critical it is to get it resolved and is there any way to avoid ABI breakage. Software compiled for 9.x won't run on 10.x even when fitted with the proper compat libs, as far as I can tell and not all software can be easily recompiled. There are also other places where BSD have subtle differences with almost any other nix flavor out there. Not accepting sun_len = 0 in the unix domain sockets is one of those places that comes to mind. Other systems just do strlen() of sun_path, while BSD does EINVAL. And we've been living with this for decades. -Maxim ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn: head/sys/netinet
On 12/30/2011 4:17 PM, Maxim Sobolev wrote: M Won't this break whole lot of third-party software, which expects M FreeBSD to be slightly different in this regards? Just curious. Yes it does. And until FreeBSD 10.0-RELEASE there is time to fix this software (at least in ports). The MFC to stable/9 of r226105 was back out. Well, I am just curious how critical it is to get it resolved and is there any way to avoid ABI breakage. Software compiled for 9.x won't run on 10.x even when fitted with the proper compat libs, as far as I can tell and not all software can be easily recompiled. P.S. It should be trivial to put some COMPAT_8/COMPAT_9 shims based on the version of the ELF image (i.e. detect if the binary is than FreeBSD 10. -Maxim ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn: head/sys/netinet
On Fri, Dec 30, 2011 at 04:25:09PM -0800, Maxim Sobolev wrote: On 12/30/2011 4:17 PM, Maxim Sobolev wrote: M Won't this break whole lot of third-party software, which expects M FreeBSD to be slightly different in this regards? Just curious. Yes it does. And until FreeBSD 10.0-RELEASE there is time to fix this software (at least in ports). The MFC to stable/9 of r226105 was back out. Well, I am just curious how critical it is to get it resolved and is there any way to avoid ABI breakage. Software compiled for 9.x won't run on 10.x even when fitted with the proper compat libs, as far as I can tell and not all software can be easily recompiled. P.S. It should be trivial to put some COMPAT_8/COMPAT_9 shims based on the version of the ELF image (i.e. detect if the binary is than FreeBSD 10. What exactly do you mean by 'version of the ELF image' ? ABI note tag ? What do you propose to do if older call comes from dso, or a library statically linked in the main binary ? pgpcpJ61NZtas.pgp Description: PGP signature