Gentoo Archives: gentoo-commits

From: "Javier Villavicencio (the_paya)" <the_paya@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-firewall/pftop/files: pftop-0.7-strnvis_fix.patch pftop-0.7-dead.patch pftop-0.7-pcap.patch pftop-0.7-queue.patch.bz2 pftop-0.7-pr123670.patch
Date: Tue, 27 Jan 2009 12:50:35
Message-Id: E1LRnOj-0005LN-7P@stork.gentoo.org
1 the_paya 09/01/27 12:50:33
2
3 Added: pftop-0.7-strnvis_fix.patch pftop-0.7-dead.patch
4 pftop-0.7-pcap.patch pftop-0.7-queue.patch.bz2
5 pftop-0.7-pr123670.patch
6 Log:
7 New version.
8 (Portage version: 2.2_rc23/cvs/FreeBSD i386)
9
10 Revision Changes Path
11 1.1 net-firewall/pftop/files/pftop-0.7-strnvis_fix.patch
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/pftop/files/pftop-0.7-strnvis_fix.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/pftop/files/pftop-0.7-strnvis_fix.patch?rev=1.1&content-type=text/plain
15
16 Index: pftop-0.7-strnvis_fix.patch
17 ===================================================================
18 Fix from FreeBSD ports.
19
20 --- sf-scanner.l.orig
21 +++ sf-scanner.l
22 @@ -233,7 +233,7 @@
23 size_t len = strlen(yytext) * 4 + 1;
24 char *v = malloc(len);
25 if (v != NULL)
26 - strnvis(v, yytext, len, 0);
27 + strvis(v, yytext, 0);
28 sf_error("illegal token: %s", v);
29 free(v);
30 }
31
32
33
34 1.1 net-firewall/pftop/files/pftop-0.7-dead.patch
35
36 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/pftop/files/pftop-0.7-dead.patch?rev=1.1&view=markup
37 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/pftop/files/pftop-0.7-dead.patch?rev=1.1&content-type=text/plain
38
39 Index: pftop-0.7-dead.patch
40 ===================================================================
41 Patch from FreeBSD ports.
42
43 --- pftop-0.7.orig/sf-gencode.c
44 +++ pftop-0.7/sf-gencode.c
45 @@ -32,7 +32,7 @@
46 #include <netinet/in.h>
47 #include <netinet/if_ether.h>
48
49 -#include <net/if_pflog.h>
50 +/* #include <net/if_pflog.h> */
51 #include <net/pfvar.h>
52
53 #include <netdb.h>
54 @@ -60,7 +60,7 @@
55 static char sf_errbuf[PFTOP_ERRBUF_SIZE];
56
57 /* VARARGS */
58 -__dead void
59 +__dead2 void
60 sf_error(const char *fmt, ...)
61 {
62 va_list ap;
63 --- pftop-0.7.orig/sf-gencode.h
64 +++ pftop-0.7/sf-gencode.h
65 @@ -169,7 +169,7 @@
66 struct arth *gen_loadexpire(void);
67
68 void bpf_optimize(struct block **);
69 -__dead void bpf_error(const char *, ...)
70 +__dead2 void bpf_error(const char *, ...)
71 __attribute__((volatile, __format__ (printf, 1, 2)));
72
73 void finish_parse(struct block *);
74 @@ -184,7 +184,7 @@
75 #define JT(b) ((b)->et.succ)
76 #define JF(b) ((b)->ef.succ)
77
78 -__dead void sf_error(const char *fmt, ...);
79 +__dead2 void sf_error(const char *fmt, ...);
80 const char *sf_get_error(void);
81 int sf_compile(struct bpf_program *, char *, int, bpf_u_int32);
82 void sf_freecode(struct bpf_program *);
83
84
85
86 1.1 net-firewall/pftop/files/pftop-0.7-pcap.patch
87
88 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/pftop/files/pftop-0.7-pcap.patch?rev=1.1&view=markup
89 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/pftop/files/pftop-0.7-pcap.patch?rev=1.1&content-type=text/plain
90
91 Index: pftop-0.7-pcap.patch
92 ===================================================================
93 Fix compilation against libpcap-1.0.0.
94
95 --- pftop-0.7.orig/bpf_dump.c
96 +++ pftop-0.7/bpf_dump.c
97 @@ -33,10 +33,10 @@
98 #include <stdio.h>
99
100
101 -extern void bpf_dump(struct bpf_program *, int);
102 +extern void bpf_dump(const struct bpf_program *, int);
103
104 void
105 -bpf_dump(struct bpf_program *p, int option)
106 +bpf_dump(const struct bpf_program *p, int option)
107 {
108 struct bpf_insn *insn;
109 int i;
110 --- pftop-0.7.orig/bpf_filter.c
111 +++ pftop-0.7/bpf_filter.c
112 @@ -134,7 +134,7 @@
113 }
114 #endif
115
116 -#include <net/bpf.h>
117 +//#include <net/bpf.h>
118
119 /*
120 * Execute the filter program starting at pc on the packet p
121 @@ -143,8 +143,8 @@
122 */
123 u_int
124 bpf_filter(pc, p, wirelen, buflen)
125 - struct bpf_insn *pc;
126 - u_char *p;
127 + const struct bpf_insn *pc;
128 + const u_char *p;
129 u_int wirelen;
130 u_int buflen;
131 {
132 --- pftop-0.7.orig/bpf_image.c
133 +++ pftop-0.7/bpf_image.c
134 @@ -36,7 +36,7 @@
135
136 char *
137 bpf_image(p, n)
138 - struct bpf_insn *p;
139 + const struct bpf_insn *p;
140 int n;
141 {
142 int v;
143 --- pftop-0.7.orig/sf-gencode.h
144 +++ pftop-0.7/sf-gencode.h
145 @@ -188,7 +188,7 @@
146 const char *sf_get_error(void);
147 int sf_compile(struct bpf_program *, char *, int, bpf_u_int32);
148 void sf_freecode(struct bpf_program *);
149 -void bpf_dump(struct bpf_program *, int);
150 +void bpf_dump(const struct bpf_program *, int);
151
152 extern int no_optimize;
153
154
155
156
157 1.1 net-firewall/pftop/files/pftop-0.7-queue.patch.bz2
158
159 <<Binary file>>
160
161
162 1.1 net-firewall/pftop/files/pftop-0.7-pr123670.patch
163
164 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/pftop/files/pftop-0.7-pr123670.patch?rev=1.1&view=markup
165 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/pftop/files/pftop-0.7-pr123670.patch?rev=1.1&content-type=text/plain
166
167 Index: pftop-0.7-pr123670.patch
168 ===================================================================
169 --- pftop.c.orig 2007-11-07 01:36:46.000000000 -0500
170 +++ pftop.c 2008-05-16 15:57:12.000000000 -0400
171 @@ -1486,7 +1486,13 @@
172 print_fld_size(FLD_BYTES, pr->bytes);
173 #endif
174 print_fld_uint(FLD_RULE, pr->nr);
175 - print_fld_str(FLD_DIR, pr->direction == PF_OUT ? "Out" : "In");
176 + if (pr->direction == PF_IN)
177 + print_fld_str(FLD_DIR, "In");
178 + else if (pr->direction == PF_OUT)
179 + print_fld_str(FLD_DIR, "Out");
180 + else
181 + print_fld_str(FLD_DIR, "Any");
182 +
183 if (pr->quick)
184 print_fld_str(FLD_QUICK, "Quick");
185
186 @@ -1570,10 +1576,10 @@
187 #ifdef HAVE_RULE_UGID
188 if (pr->uid.op)
189 tb_print_ugid(pr->uid.op, pr->uid.uid[0], pr->uid.uid[1],
190 - "user", UID_MAX);
191 + "user", UINT_MAX);
192 if (pr->gid.op)
193 tb_print_ugid(pr->gid.op, pr->gid.gid[0], pr->gid.gid[1],
194 - "group", GID_MAX);
195 + "group", UINT_MAX);
196 #endif
197
198 if (pr->flags || pr->flagset) {
199 @@ -1765,7 +1771,12 @@
200 strerror(errno));
201 return (-1);
202 }
203 +#ifdef PFALTQ_FLAG_IF_REMOVED
204 + if (pa.altq.qid > 0 &&
205 + !(pa.altq.local_flags & PFALTQ_FLAG_IF_REMOVED)) {
206 +#else
207 if (pa.altq.qid > 0) {
208 +#endif
209 pq.nr = nr;
210 pq.ticket = pa.ticket;
211 pq.buf = &qstats;