Historically in BSD the raw sockets were not truly raw. The following conventions held: * packet is modified - packets' ip_len and ip_off are converted to host byte order - packets' ip_len is reduced by the actual size of IP header Starting with 10.0-RELEASE convention is: * packet is modified - packets' ip_len and ip_off are converted to host byte order For longer story see: http://lists.freebsd.org/pipermail/freebsd-current/2014-January/047937.html We are targeting at 11.0-RELEASE to pass unmodified packets on SOCK_RAW sockets. This was committed as r270929i, new ''%%__FreeBSD_version%%'' is 1100030. The minimal set of software in ports that we must adopt by the time patch hits the tree: | port name | status | | src/contrib/traceroute | [[http://dev.bsdrp.net/SOCK_RAW/freebsd.raw_socket-traceroute.patch|usr.sbin/traceroute/Makefile patch]] for setting BYTESWAP_IP_HDR (included in the same commit as sock_raw) | | net/quagga & net/quagga-re | [[http://dev.bsdrp.net/SOCK_RAW/ports.quagga.patch|quagga patch]] and [[http://dev.bsdrp.net/SOCK_RAW/ports.quagga-re.patch|quagga-re patch]] (ospf tested on quagga-re) [[https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193244|PR 193244]] | | net/zebra | [[http://dev.bsdrp.net/SOCK_RAW/ports.zebra.patch|zebra patch]] (ospf tested) [[https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193249|PR 193249]] | | libnet/libdnet | File trunk/config/acinclude.m4 set HAVE_RAWIP_HOST_OFFLEN if OS use host byte ordering: Need to be patched. But I've tested net/dhcprelay (uses libdnet) without patch and it's not impacted | | security/ipsec-tools | A port bug (regression since 0.8.1) prevent me to test it (bug related to NAT-T, but even with "nat_traversal off;" in my config file I can't use it) | | openvpn | not impacted (tested) | | freevrrpd | [[http://dev.bsdrp.net/SOCK_RAW/ports.freevrrpd.patch|freevrrpd patch]] [[https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193243|PR 193243]] | | relayd | not impacted (tested) | | net/isc-dhcp*-server%%|%%relay | isc-dhcp43-relay-4.3.0 and isc-dhcp43-server-4.3.0 not impacted (tested) | | bird | ospfv2 (bird) impacted: "Socket error on em0: Invalid argument". Because it works on 10.0 without patching it, it should be a "host byte order" problem and not an "ip_len": sysdep/bsd/sysio.h ? [[https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193245|PR 193245]] | | net-snmp | not impacted (tested) | | dnsmasq | | | fping | not impacted (tested) |