1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-27 01:49:03 +00:00

Fix raw packet sending on FreeBSD 10.0 and later.

See https://svnweb.freebsd.org/base?view=revision&revision=241913 for
the change. Closes #196. Fixes #50.
This commit is contained in:
dmiller
2015-08-06 21:10:36 +00:00
parent 9fbad88213
commit 9ab82ecedf
2 changed files with 6 additions and 2 deletions

View File

@@ -3604,7 +3604,7 @@ int send_ip_packet_sd(int sd, const struct sockaddr_in *dst,
must deal with it here rather than when building the packet,
because they should be in NBO when I'm sending over raw
ethernet */
#if FREEBSD || BSDI || NETBSD || DEC || MACOSX
#if (defined(FREEBSD) && (__FreeBSD_version < 1000022)) || BSDI || NETBSD || DEC || MACOSX
ip->ip_len = ntohs(ip->ip_len);
ip->ip_off = ntohs(ip->ip_off);
#endif
@@ -3614,7 +3614,7 @@ int send_ip_packet_sd(int sd, const struct sockaddr_in *dst,
(int) sizeof(struct sockaddr_in));
/* Undo the byte order switching. */
#if FREEBSD || BSDI || NETBSD || DEC || MACOSX
#if (defined(FREEBSD) && (__FreeBSD_version < 1000022)) || BSDI || NETBSD || DEC || MACOSX
ip->ip_len = htons(ip->ip_len);
ip->ip_off = htons(ip->ip_off);
#endif