summaryrefslogtreecommitdiffstats
path: root/usr.sbin/traceroute
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2014-09-01 14:04:51 +0000
committerglebius <glebius@FreeBSD.org>2014-09-01 14:04:51 +0000
commit2dd39cca12078044c672d24d2f1b74c30ac10843 (patch)
treee39da6f40dcaa268764de6c04e21962652d4f5ee /usr.sbin/traceroute
parent0cbf499e97e7e2df822105d60f96901274218bbe (diff)
downloadFreeBSD-src-2dd39cca12078044c672d24d2f1b74c30ac10843.zip
FreeBSD-src-2dd39cca12078044c672d24d2f1b74c30ac10843.tar.gz
Make SOCK_RAW sockets to be truly raw, not modifying received and sent
packets at all. Swapping byte order on SOCK_RAW was actually a bug, an artifact from the BSD network stack, that used to convert a packet to native byte order once it is received by kernel. Other operating systems didn't follow this, and later other BSD descendants fixed this, leaving us alone with the bug. Now it is clear that we should fix the bug. In collaboration with: Olivier Cochard-Labbé <olivier cochard.me> See also: https://wiki.freebsd.org/SOCK_RAW Sponsored by: Nginx, Inc.
Diffstat (limited to 'usr.sbin/traceroute')
-rw-r--r--usr.sbin/traceroute/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/traceroute/Makefile b/usr.sbin/traceroute/Makefile
index 103d206..12f9a0b 100644
--- a/usr.sbin/traceroute/Makefile
+++ b/usr.sbin/traceroute/Makefile
@@ -13,7 +13,7 @@ CLEANFILES= version.c
CFLAGS+= -DHAVE_SYS_SELECT_H=1 -DHAVE_SYS_SOCKIO_H=1 \
-DHAVE_NET_ROUTE_H=1 -DHAVE_NET_IF_DL_H=1 \
-DHAVE_STRERROR=1 -DHAVE_USLEEP=1 \
- -DHAVE_SYS_SYSCTL_H=1 \
+ -DHAVE_SYS_SYSCTL_H=1 -DBYTESWAP_IP_HDR=1 \
-DHAVE_SETLINEBUF=1 -DHAVE_RAW_OPTIONS=1 \
-DHAVE_SOCKADDR_SA_LEN=1 -DHAVE_ICMP_NEXTMTU=1
.if !defined(TRACEROUTE_NO_IPSEC)
OpenPOWER on IntegriCloud