From 2dd39cca12078044c672d24d2f1b74c30ac10843 Mon Sep 17 00:00:00 2001 From: glebius Date: Mon, 1 Sep 2014 14:04:51 +0000 Subject: 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. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é See also: https://wiki.freebsd.org/SOCK_RAW Sponsored by: Nginx, Inc. --- usr.sbin/traceroute/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.sbin/traceroute') 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) -- cgit v1.1