Created attachment 159626 [details] Diff to put into files/. The attached patch (drop intoto files/) makes Nmap SYN scanning (and perhaps others, other than Connect scan, which already worked) work on FreeBSD 10.0 and up. Without it, attempt to scan ("nmap -Av -sS localhost") would result in: sendto in send_ip_packet_sd: sendto(5, packet, 44, 0, 127.0.0.1, 16) => Invalid argument Offending packet: TCP 127.0.0.1:62353 > 127.0.0.1:995 S ttl=40 id=64012 iplen=11264 seq=1481935911 win=1024
Forgot to add: Sponsored by: The FreeBSD Foundation
Using (__FreeBSD_version < 1000022) all 10.x releases are affected. Regarding https://svnweb.freebsd.org/base?view=revision&revision=270929 the correct __FreeBSD_version should be 1100030 (not 1000022)
A commit references this bug: Author: ohauer Date: Sun Sep 27 10:32:33 UTC 2015 New revision: 398033 URL: https://svnweb.freebsd.org/changeset/ports/398033 Log: - update to 6.49BETA5 - use DOCS instead PORTDOCS - remove gcc workaround [1] - (hopefully) use the correct __FreeBSD_version for SOCK_RAW Changelog: https://nmap.org/changelog.html PR: 196065 [1] PR: 200558 [2] PR: 202139 [3] Submitted by: sbruno@ , mikael.urankar@gmail.com [1] Submitted by: truckman@ [2] Submitted by: trasz@ [3] Changes: head/security/nmap/Makefile head/security/nmap/distinfo head/security/nmap/files/patch-Makefile.in head/security/nmap/files/patch-configure head/security/nmap/files/patch-libdnet-stripped__configure head/security/nmap/files/patch-libdnet-stripped__src__eth-bsd.c head/security/nmap/files/patch-liblua-lua523 head/security/nmap/files/patch-liblua__Makefile head/security/nmap/files/patch-liblua__liolib.c head/security/nmap/files/patch-libnetutil_netutil.cc head/security/nmap/files/patch-nmap.cc head/security/nmap/files/patch-output.cc head/security/nmap/files/patch-tcpip.cc head/security/nmap/pkg-plist
Committed with different __FreeBSD_version, Thanks!