summaryrefslogtreecommitdiff
path: root/net/hping/files/extra-patch-sendip.c
blob: 872861983e5a3b4ab40c969053cec5a11a21a544 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--- sendip.c.orig	2003-08-01 21:28:07.000000000 +0800
+++ sendip.c	2015-12-22 23:16:39.296072000 +0800
@@ -48,12 +48,12 @@
 	ip->ihl		= (IPHDR_SIZE + optlen + 3) >> 2;
 	ip->tos		= ip_tos;
 
-#if defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD || defined OSTYPE_BSDI
-/* FreeBSD */
+#if defined OSTYPE_NETBSD || defined OSTYPE_BSDI
 /* NetBSD */
 	ip->tot_len	= packetsize;
 #else
 /* Linux */
+/* FreeBSD */
 /* OpenBSD */
 	ip->tot_len	= htons(packetsize);
 #endif
@@ -73,13 +73,13 @@
 			htons((unsigned short) src_id);
 	}
 
-#if defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD | defined OSTYPE_BSDI
-/* FreeBSD */
+#if defined OSTYPE_NETBSD | defined OSTYPE_BSDI
 /* NetBSD */
 	ip->frag_off	|= more_fragments;
 	ip->frag_off	|= fragoff >> 3;
 #else
 /* Linux */
+/* FreeBSD */
 /* OpenBSD */
 	ip->frag_off	|= htons(more_fragments);
 	ip->frag_off	|= htons(fragoff >> 3); /* shift three flags bit */