updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / ipp2p / ipp2p-0.8.2-iptables-1.4.3.patch
blob07d409e81a3040abb2948e2d99be9daef00ef17e
1 --- libipt_ipp2p.c.orig 2009-04-22 13:49:39.406534368 +0200
2 +++ libipt_ipp2p.c 2009-04-22 13:52:39.573179617 +0200
3 @@ -85,39 +85,39 @@
4 switch (c) {
5 case '1': /*cmd: ipp2p*/
6 if ((*flags & SHORT_HAND_IPP2P) == SHORT_HAND_IPP2P)
7 - exit_error(PARAMETER_PROBLEM,
8 + xtables_error(PARAMETER_PROBLEM,
9 "ipp2p: `--ipp2p' may only be "
10 "specified once!");
11 /* if ((*flags & SHORT_HAND_DATA) == SHORT_HAND_DATA)
12 - exit_error(PARAMETER_PROBLEM,
13 + xtables_error(PARAMETER_PROBLEM,
14 "ipp2p: `--ipp2p-data' may only be "
15 "specified alone!");*/
16 if ((*flags) != 0)
17 - exit_error(PARAMETER_PROBLEM,
18 + xtables_error(PARAMETER_PROBLEM,
19 "ipp2p: `--ipp2p' may only be "
20 "specified alone!");
21 - if (invert) exit_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
22 + if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
23 *flags += SHORT_HAND_IPP2P;
24 info->cmd = *flags;
25 break;
27 case '2': /*cmd: edk*/
28 if ((*flags & IPP2P_EDK) == IPP2P_EDK)
29 - exit_error(PARAMETER_PROBLEM,
30 + xtables_error(PARAMETER_PROBLEM,
31 "ipp2p: `--edk' may only be "
32 "specified once");
33 if ((*flags & SHORT_HAND_IPP2P) == SHORT_HAND_IPP2P)
34 - exit_error(PARAMETER_PROBLEM,
35 + xtables_error(PARAMETER_PROBLEM,
36 "ipp2p: `--ipp2p' may only be "
37 "specified alone!");
38 /* if ((*flags & SHORT_HAND_DATA) == SHORT_HAND_DATA)
39 - exit_error(PARAMETER_PROBLEM,
40 + xtables_error(PARAMETER_PROBLEM,
41 "ipp2p: `--ipp2p-data' may only be "
42 "specified alone!");*/
43 if ((*flags & IPP2P_DATA_EDK) == IPP2P_DATA_EDK)
44 - exit_error(PARAMETER_PROBLEM,
45 + xtables_error(PARAMETER_PROBLEM,
46 "ipp2p: use `--edk' OR `--edk-data' but not both of them!");
47 - if (invert) exit_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
48 + if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
49 *flags += IPP2P_EDK;
50 info->cmd = *flags;
51 break;
52 @@ -125,21 +125,21 @@
54 case '7': /*cmd: dc*/
55 if ((*flags & IPP2P_DC) == IPP2P_DC)
56 - exit_error(PARAMETER_PROBLEM,
57 + xtables_error(PARAMETER_PROBLEM,
58 "ipp2p: `--dc' may only be "
59 "specified once!");
60 if ((*flags & SHORT_HAND_IPP2P) == SHORT_HAND_IPP2P)
61 - exit_error(PARAMETER_PROBLEM,
62 + xtables_error(PARAMETER_PROBLEM,
63 "ipp2p: `--ipp2p' may only be "
64 "specified alone!");
65 /* if ((*flags & SHORT_HAND_DATA) == SHORT_HAND_DATA)
66 - exit_error(PARAMETER_PROBLEM,
67 + xtables_error(PARAMETER_PROBLEM,
68 "ipp2p: `--ipp2p-data' may only be "
69 "specified alone!");*/
70 if ((*flags & IPP2P_DATA_DC) == IPP2P_DATA_DC)
71 - exit_error(PARAMETER_PROBLEM,
72 + xtables_error(PARAMETER_PROBLEM,
73 "ipp2p: use `--dc' OR `--dc-data' but not both of them!");
74 - if (invert) exit_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
75 + if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
76 *flags += IPP2P_DC;
77 info->cmd = *flags;
78 break;
79 @@ -147,70 +147,70 @@
81 case '9': /*cmd: gnu*/
82 if ((*flags & IPP2P_GNU) == IPP2P_GNU)
83 - exit_error(PARAMETER_PROBLEM,
84 + xtables_error(PARAMETER_PROBLEM,
85 "ipp2p: `--gnu' may only be "
86 "specified once!");
87 /* if ((*flags & SHORT_HAND_DATA) == SHORT_HAND_DATA)
88 - exit_error(PARAMETER_PROBLEM,
89 + xtables_error(PARAMETER_PROBLEM,
90 "ipp2p: `--ipp2p-data' may only be "
91 "specified alone!");*/
92 if ((*flags & SHORT_HAND_IPP2P) == SHORT_HAND_IPP2P)
93 - exit_error(PARAMETER_PROBLEM,
94 + xtables_error(PARAMETER_PROBLEM,
95 "ipp2p: `--ipp2p' may only be "
96 "specified alone!");
97 if ((*flags & IPP2P_DATA_GNU) == IPP2P_DATA_GNU)
98 - exit_error(PARAMETER_PROBLEM,
99 + xtables_error(PARAMETER_PROBLEM,
100 "ipp2p: use `--gnu' OR `--gnu-data' but not both of them!");
101 - if (invert) exit_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
102 + if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
103 *flags += IPP2P_GNU;
104 info->cmd = *flags;
105 break;
107 case 'a': /*cmd: kazaa*/
108 if ((*flags & IPP2P_KAZAA) == IPP2P_KAZAA)
109 - exit_error(PARAMETER_PROBLEM,
110 + xtables_error(PARAMETER_PROBLEM,
111 "ipp2p: `--kazaa' may only be "
112 "specified once!");
113 /* if ((*flags & SHORT_HAND_DATA) == SHORT_HAND_DATA)
114 - exit_error(PARAMETER_PROBLEM,
115 + xtables_error(PARAMETER_PROBLEM,
116 "ipp2p: `--ipp2p-data' may only be "
117 "specified alone!");*/
118 if ((*flags & SHORT_HAND_IPP2P) == SHORT_HAND_IPP2P)
119 - exit_error(PARAMETER_PROBLEM,
120 + xtables_error(PARAMETER_PROBLEM,
121 "ipp2p: `--ipp2p' may only be "
122 "specified alone!");
123 if ((*flags & IPP2P_DATA_KAZAA) == IPP2P_DATA_KAZAA)
124 - exit_error(PARAMETER_PROBLEM,
125 + xtables_error(PARAMETER_PROBLEM,
126 "ipp2p: use `--kazaa' OR `--kazaa-data' but not both of them!");
127 - if (invert) exit_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
128 + if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
129 *flags += IPP2P_KAZAA;
130 info->cmd = *flags;
131 break;
133 case 'b': /*cmd: bit*/
134 if ((*flags & IPP2P_BIT) == IPP2P_BIT)
135 - exit_error(PARAMETER_PROBLEM,
136 + xtables_error(PARAMETER_PROBLEM,
137 "ipp2p: `--bit' may only be "
138 "specified once!");
139 if ((*flags & SHORT_HAND_IPP2P) == SHORT_HAND_IPP2P)
140 - exit_error(PARAMETER_PROBLEM,
141 + xtables_error(PARAMETER_PROBLEM,
142 "ipp2p: `--ipp2p' may only be "
143 "specified alone!");
144 - if (invert) exit_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
145 + if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
146 *flags += IPP2P_BIT;
147 info->cmd = *flags;
148 break;
150 case 'c': /*cmd: apple*/
151 if ((*flags & IPP2P_APPLE) == IPP2P_APPLE)
152 - exit_error(PARAMETER_PROBLEM,
153 + xtables_error(PARAMETER_PROBLEM,
154 "ipp2p: `--apple' may only be "
155 "specified once!");
156 if ((*flags & SHORT_HAND_IPP2P) == SHORT_HAND_IPP2P)
157 - exit_error(PARAMETER_PROBLEM,
158 + xtables_error(PARAMETER_PROBLEM,
159 "ipp2p: `--ipp2p' may only be "
160 "specified alone!");
161 - if (invert) exit_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
162 + if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
163 *flags += IPP2P_APPLE;
164 info->cmd = *flags;
165 break;
166 @@ -218,14 +218,14 @@
168 case 'd': /*cmd: soul*/
169 if ((*flags & IPP2P_SOUL) == IPP2P_SOUL)
170 - exit_error(PARAMETER_PROBLEM,
171 + xtables_error(PARAMETER_PROBLEM,
172 "ipp2p: `--soul' may only be "
173 "specified once!");
174 if ((*flags & SHORT_HAND_IPP2P) == SHORT_HAND_IPP2P)
175 - exit_error(PARAMETER_PROBLEM,
176 + xtables_error(PARAMETER_PROBLEM,
177 "ipp2p: `--ipp2p' may only be "
178 "specified alone!");
179 - if (invert) exit_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
180 + if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
181 *flags += IPP2P_SOUL;
182 info->cmd = *flags;
183 break;
184 @@ -233,67 +233,67 @@
186 case 'e': /*cmd: winmx*/
187 if ((*flags & IPP2P_WINMX) == IPP2P_WINMX)
188 - exit_error(PARAMETER_PROBLEM,
189 + xtables_error(PARAMETER_PROBLEM,
190 "ipp2p: `--winmx' may only be "
191 "specified once!");
192 if ((*flags & SHORT_HAND_IPP2P) == SHORT_HAND_IPP2P)
193 - exit_error(PARAMETER_PROBLEM,
194 + xtables_error(PARAMETER_PROBLEM,
195 "ipp2p: `--ipp2p' may only be "
196 "specified alone!");
197 - if (invert) exit_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
198 + if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
199 *flags += IPP2P_WINMX;
200 info->cmd = *flags;
201 break;
203 case 'f': /*cmd: ares*/
204 if ((*flags & IPP2P_ARES) == IPP2P_ARES)
205 - exit_error(PARAMETER_PROBLEM,
206 + xtables_error(PARAMETER_PROBLEM,
207 "ipp2p: `--ares' may only be "
208 "specified once!");
209 if ((*flags & SHORT_HAND_IPP2P) == SHORT_HAND_IPP2P)
210 - exit_error(PARAMETER_PROBLEM,
211 + xtables_error(PARAMETER_PROBLEM,
212 "ipp2p: `--ipp2p' may only be "
213 "specified alone!");
214 - if (invert) exit_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
215 + if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
216 *flags += IPP2P_ARES;
217 info->cmd = *flags;
218 break;
220 case 'g': /*cmd: mute*/
221 if ((*flags & IPP2P_MUTE) == IPP2P_MUTE)
222 - exit_error(PARAMETER_PROBLEM,
223 + xtables_error(PARAMETER_PROBLEM,
224 "ipp2p: `--mute' may only be "
225 "specified once!");
226 - if (invert) exit_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
227 + if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
228 *flags += IPP2P_MUTE;
229 info->cmd = *flags;
230 break;
231 case 'h': /*cmd: waste*/
232 if ((*flags & IPP2P_WASTE) == IPP2P_WASTE)
233 - exit_error(PARAMETER_PROBLEM,
234 + xtables_error(PARAMETER_PROBLEM,
235 "ipp2p: `--waste' may only be "
236 "specified once!");
237 - if (invert) exit_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
238 + if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
239 *flags += IPP2P_WASTE;
240 info->cmd = *flags;
241 break;
242 case 'i': /*cmd: xdcc*/
243 if ((*flags & IPP2P_XDCC) == IPP2P_XDCC)
244 - exit_error(PARAMETER_PROBLEM,
245 + xtables_error(PARAMETER_PROBLEM,
246 "ipp2p: `--ares' may only be "
247 "specified once!");
248 - if (invert) exit_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
249 + if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
250 *flags += IPP2P_XDCC;
251 info->cmd = *flags;
252 break;
254 case 'j': /*cmd: debug*/
255 - if (invert) exit_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
256 + if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
257 info->debug = 1;
258 break;
260 default:
261 -// exit_error(PARAMETER_PROBLEM,
262 +// xtables_error(PARAMETER_PROBLEM,
263 // "\nipp2p-parameter problem: for ipp2p usage type: iptables -m ipp2p --help\n");
264 return 0;
266 @@ -305,7 +305,7 @@
267 final_check(unsigned int flags)
269 if (!flags)
270 - exit_error(PARAMETER_PROBLEM,
271 + xtables_error(PARAMETER_PROBLEM,
272 "\nipp2p-parameter problem: for ipp2p usage type: iptables -m ipp2p --help\n");
275 @@ -378,7 +378,7 @@
276 .next = NULL,
277 .name = "ipp2p",
278 .family = PF_INET,
279 - .version = IPTABLES_VERSION,
280 + .version = XTABLES_VERSION,
281 .size = XT_ALIGN(sizeof(struct ipt_p2p_info)),
282 .userspacesize = XT_ALIGN(sizeof(struct ipt_p2p_info)),
283 .help = &help,