View | Details | Raw Unified | Return to bug 59548
Collapse All | Expand All

(-)pf/Makefile (+1 lines)
Lines 7-12 Link Here
7
7
8
PORTNAME=	pf_freebsd
8
PORTNAME=	pf_freebsd
9
PORTVERSION=	2.00
9
PORTVERSION=	2.00
10
PORTREVISION=	1
10
CATEGORIES=	security ipv6
11
CATEGORIES=	security ipv6
11
MASTER_SITES=	http://pf4freebsd.love2party.net/
12
MASTER_SITES=	http://pf4freebsd.love2party.net/
12
.if defined(WITH_ALTQ) && (${WITH_ALTQ} == "yes")
13
.if defined(WITH_ALTQ) && (${WITH_ALTQ} == "yes")
(-)pf/files/patch-ac (+98 lines)
Line 0 Link Here
1
--- pf/pf.c.orig	Fri Nov 21 14:32:14 2003
2
+++ pf/pf.c	Fri Nov 21 14:32:33 2003
3
@@ -1250,8 +1250,10 @@
4
 	struct tcphdr	*th;
5
 #if defined(__FreeBSD__)
6
 	struct ip 	*ip;
7
+#if (__FreeBSD_version < 501114)
8
 	struct route 	 ro;
9
 #endif
10
+#endif
11
 	char *opt;
12
 
13
 	/* maximum segment size tcp option */
14
@@ -1366,7 +1368,6 @@
15
 		h->ip_ttl = ttl ? ttl : ip_defttl;
16
 		h->ip_sum = 0;
17
 #if defined(__FreeBSD__)
18
-		bzero(&ro, sizeof(ro));
19
 		ip = mtod(m, struct ip *);
20
 		/*
21
 		 * XXX
22
@@ -1376,6 +1377,8 @@
23
 		 */
24
 		NTOHS(ip->ip_len);
25
 		NTOHS(ip->ip_off);
26
+#if (__FreeBSD_version < 501114)
27
+		bzero(&ro, sizeof(ro));
28
 		ip_rtaddr(ip->ip_dst, &ro);
29
 		PF_UNLOCK();
30
 		ip_output(m, (void *)NULL, &ro, 0, (void *)NULL,
31
@@ -1384,7 +1387,13 @@
32
 		if(ro.ro_rt) {
33
 			RTFREE(ro.ro_rt);
34
 		}
35
-#else
36
+#else /* __FreeBSD_version >= 501114 */
37
+		PF_UNLOCK();
38
+		ip_output(m, (void *)NULL, (void *)NULL, 0, (void *)NULL,
39
+			(void *)NULL);
40
+		PF_LOCK();
41
+#endif
42
+#else /* ! __FreeBSD__ */
43
 		ip_output(m, (void *)NULL, (void *)NULL, 0, (void *)NULL,
44
 		    (void *)NULL);
45
 #endif
46
@@ -2354,8 +2363,12 @@
47
 		dst->sin_len = sizeof(*dst);
48
 		dst->sin_addr = addr->v4;
49
 #if defined(__FreeBSD__)
50
+#ifdef RTF_PRCLONING
51
 		rtalloc_ign(&ro, (RTF_CLONING | RTF_PRCLONING));
52
-#else
53
+#else /* !RTF_PRCLONING */
54
+		rtalloc_ign(&ro, RTF_CLONING);
55
+#endif
56
+#else /* ! __FreeBSD__ */
57
 		rtalloc_noclone(&ro, NO_CLONING);
58
 #endif
59
 		rt = ro.ro_rt;
60
@@ -2370,9 +2383,13 @@
61
 		dst6->sin6_len = sizeof(*dst6);
62
 		dst6->sin6_addr = addr->v6;
63
 #if defined(__FreeBSD__)
64
+#ifdef RTF_PRCLONING
65
 		rtalloc_ign((struct route *)&ro6,
66
 		    (RTF_CLONING | RTF_PRCLONING));
67
-#else
68
+#else /* !RTF_PRCLONING */
69
+		rtalloc_ign((struct route *)&ro6, RTF_CLONING);
70
+#endif
71
+#else /* ! __FreeBSD__ */
72
 		rtalloc_noclone((struct route *)&ro6, NO_CLONING);
73
 #endif
74
 		rt = ro6.ro_rt;
75
@@ -4731,8 +4748,12 @@
76
 	dst->sin_len = sizeof(*dst);
77
 	dst->sin_addr = addr->v4;
78
 #if defined(__FreeBSD__)
79
+#ifdef RTF_PRCLONING
80
 	rtalloc_ign(&ro, (RTF_CLONING|RTF_PRCLONING));
81
-#else
82
+#else /* !RTF_PRCLONING */
83
+	rtalloc_ign(&ro, RTF_CLONING);
84
+#endif
85
+#else /* ! __FreeBSD__ */
86
 	rtalloc_noclone(&ro, NO_CLONING);
87
 #endif
88
 
89
@@ -5044,7 +5065,8 @@
90
 	m0->m_pkthdr.csum_flags &= ifp->if_hwassist;
91
 
92
 	if (ntohs(ip->ip_len) <= ifp->if_mtu ||
93
-		ifp->if_hwassist & CSUM_FRAGMENT) {
94
+	    (ifp->if_hwassist & CSUM_FRAGMENT &&
95
+		((ip->ip_off & htons(IP_DF)) == 0))) {
96
 		/*
97
 		 * ip->ip_len = htons(ip->ip_len);
98
 		 * ip->ip_off = htons(ip->ip_off);
(-)pf/files/patch-ad (+23 lines)
Line 0 Link Here
1
--- freebsd_libpcap/savefile.c.orig	Fri Nov 21 14:35:34 2003
2
+++ freebsd_libpcap/savefile.c	Fri Nov 21 14:35:46 2003
3
@@ -178,6 +178,9 @@
4
 #define LINKTYPE_HDLC		112		/* NetBSD HDLC framing */
5
 #define LINKTYPE_IPFILTER	116		/* IP Filter capture files */
6
 #define LINKTYPE_PFLOG		117		/* OpenBSD DLT_PFLOG */
7
+#if defined(DLT_PFSYNC)
8
+#define LINKTYPE_PFSYNC		DLT_PFSYNC
9
+#endif
10
 
11
 static struct linktype_map {
12
 	int	dlt;
13
@@ -271,6 +274,10 @@
14
 	 *	defining DLT_* values that collide with those
15
 	 *	LINKTYPE_* values, either).
16
 	 */
17
+	{ DLT_PFLOG,		LINKTYPE_PFLOG },
18
+#if defined(DLT_PFSYNC)
19
+	{ DLT_PFSYNC,		LINKTYPE_PFSYNC },
20
+#endif
21
 	{ -1,			-1 }
22
 };
23
 

Return to bug 59548