]> git.pld-linux.org Git - packages/iptables.git/blob - iptables-1.2.8-ipt_p2p.patch
- allow build with -O0
[packages/iptables.git] / iptables-1.2.8-ipt_p2p.patch
1 diff -Nru iptables-1.2.8-old/extensions/Makefile iptables-1.2.8/extensions/Makefile
2 --- iptables-1.2.9rc1.orig/extensions/Makefile  Mon Oct 27 09:53:59 2003
3 +++ iptables-1.2.9rc1/extensions/Makefile       Mon Oct 27 09:55:25 2003
4 @@ -5,7 +5,7 @@
5  # header files are present in the include/linux directory of this iptables
6  # package (HW)
7  #
8 -PF_EXT_SLIB:=ah connlimit conntrack dscp ecn esp helper stealth icmp length limit mac mark multiport owner physdev pkttype rpc standard state tcp tcpmss tos ttl udp unclean DNAT DSCP ECN LOG MARK MASQUERADE MIRROR REDIRECT REJECT SAME SNAT TARPIT TCPMSS TOS TTL ULOG IMQ
9 +PF_EXT_SLIB:=ah connlimit conntrack dscp ecn esp helper stealth icmp length limit mac mark multiport owner physdev pkttype rpc standard state tcp tcpmss tos ttl udp unclean DNAT DSCP ECN LOG MARK MASQUERADE MIRROR REDIRECT REJECT SAME SNAT TARPIT TCPMSS TOS TTL ULOG IMQ p2p
10  PF6_EXT_SLIB:=eui64 hl icmpv6 length limit mac mark multiport owner standard tcp udp HL LOG MARK
11  
12  # Optionals
13 diff -Nru iptables-1.2.8-old/extensions/libipt_p2p.c iptables-1.2.8/extensions/libipt_p2p.c
14 --- iptables-1.2.8-old/extensions/libipt_p2p.c  1970-01-01 01:00:00.000000000 +0100
15 +++ iptables-1.2.8/extensions/libipt_p2p.c      2003-10-18 18:52:04.885996952 +0100
16 @@ -0,0 +1,63 @@
17 +/* Shared library add-on to iptables for unclean. */
18 +#include <stdio.h>
19 +#include <stdlib.h>
20 +#include <getopt.h>
21 +#include <iptables.h>
22 +
23 +/* Function which prints out usage message. */
24 +static void
25 +help(void)
26 +{
27 +       printf(
28 +"p2p v%s takes no options\n"
29 +"\n", IPTABLES_VERSION);
30 +}
31 +
32 +static struct option opts[] = {
33 +       {0}
34 +};
35 +
36 +/* Initialize the match. */
37 +static void
38 +init(struct ipt_entry_match *m, unsigned int *nfcache)
39 +{
40 +       /* Can't cache this. */
41 +       *nfcache |= NFC_UNKNOWN;
42 +}
43 +
44 +/* Function which parses command options; returns true if it
45 +   ate an option */
46 +static int
47 +parse(int c, char **argv, int invert, unsigned int *flags,
48 +      const struct ipt_entry *entry,
49 +      unsigned int *nfcache,
50 +      struct ipt_entry_match **match)
51 +{
52 +       return 0;
53 +}
54 +
55 +/* Final check; must have specified --mac. */
56 +static void final_check(unsigned int flags)
57 +{
58 +}
59 +
60 +static
61 +struct iptables_match p2p
62 += { NULL,
63 +    "p2p",
64 +    IPTABLES_VERSION,
65 +    IPT_ALIGN(0),
66 +    IPT_ALIGN(0),
67 +    &help,
68 +    &init,
69 +    &parse,
70 +    &final_check,
71 +    NULL, /* print */
72 +    NULL, /* save */
73 +    opts
74 +};
75 +
76 +void _init(void)
77 +{
78 +       register_match(&p2p);
79 +}
This page took 0.110893 seconds and 3 git commands to generate.