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 | usr.sbin/traceroute/Makefile patch for setting BYTESWAP_IP_HDR (included in the same commit as sock_raw) |
| net/quagga & net/quagga-re | quagga patch and quagga-re patch (ospf tested on quagga-re) PR 193244 |
| net/zebra | zebra patch (ospf tested) 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 | freevrrpd patch 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 ? PR 193245 |
| net-snmp | not impacted (tested) |
| dnsmasq | |
| fping | not impacted (tested) |