mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-25 05:13:19 +02:00
update ipp2p to version 0.7.4
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@369 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
cb3aa85fe6
commit
61fc978d67
@ -1,7 +1,7 @@
|
||||
diff -urN iptables-1.2.11.old/extensions/libipt_ipp2p.c iptables-1.2.11/extensions/libipt_ipp2p.c
|
||||
--- iptables-1.2.11.old/extensions/libipt_ipp2p.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ iptables-1.2.11/extensions/libipt_ipp2p.c 2005-03-01 17:49:59.000000000 +0100
|
||||
@@ -0,0 +1,482 @@
|
||||
+++ iptables-1.2.11/extensions/libipt_ipp2p.c 2005-03-12 00:50:27.000000000 +0100
|
||||
@@ -0,0 +1,455 @@
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <netdb.h>
|
||||
@ -40,15 +40,13 @@ diff -urN iptables-1.2.11.old/extensions/libipt_ipp2p.c iptables-1.2.11/extensio
|
||||
+ "\nNote that the follwing options will have the same meaning:\n"
|
||||
+ " '--ipp2p' is equal to '--edk --dc --kazaa --gnu'\n"
|
||||
+ " '--ipp2p-data' is equal to '--edk-data --dc-data --kazaa-data --gnu-data'\n"
|
||||
+ "\nIPP2P was intended for TCP only. Due to increasing usage of UDP we needed to change this:\n"
|
||||
+ " --udp search UDP packets only\n"
|
||||
+ " --tcp search TCP packets only\n"
|
||||
+ " --udp --tcp search UDP and TCP packets\n"
|
||||
+ "\nIPP2P was intended for TCP only. Due to increasing usage of UDP we needed to change this.\n"
|
||||
+ "You can now use -p udp to search UDP packets only or without -p switch to search UDP and TCP packets.\n"
|
||||
+ "\nSee README included with this package for more details or visit http://www.ipp2p.org\n"
|
||||
+ "\nExamples:\n"
|
||||
+ " iptables -A FORWARD -m ipp2p --ipp2p -j MARK --set-mark 0x01\n"
|
||||
+ " iptables -A FORWARD -m ipp2p --udp --kazaa --bit -j DROP\n"
|
||||
+ " iptables -A FORWARD -m ipp2p --tcp --edk --soul -j DROP\n\n"
|
||||
+ " iptables -A FORWARD -p udp -m ipp2p --kazaa --bit -j DROP\n"
|
||||
+ " iptables -A FORWARD -p tcp -m ipp2p --edk --soul -j DROP\n\n"
|
||||
+ , IPP2P_VERSION);
|
||||
+}
|
||||
+
|
||||
@ -71,8 +69,6 @@ diff -urN iptables-1.2.11.old/extensions/libipt_ipp2p.c iptables-1.2.11/extensio
|
||||
+ { "winmx", 0, 0, 'e' },
|
||||
+ { "ares", 0, 0, 'f' },
|
||||
+ { "debug", 0, 0, 'g' },
|
||||
+ { "udp", 0, 0, 'h' },
|
||||
+ { "tcp", 0, 0, 'i' },
|
||||
+ {0}
|
||||
+};
|
||||
+
|
||||
@ -88,7 +84,6 @@ diff -urN iptables-1.2.11.old/extensions/libipt_ipp2p.c iptables-1.2.11/extensio
|
||||
+ /*init the module with default values*/
|
||||
+ info->cmd = 0;
|
||||
+ info->debug = 0;
|
||||
+ info->proto = IPP2P_PROTO_DEFAULT;
|
||||
+
|
||||
+}
|
||||
+
|
||||
@ -364,25 +359,6 @@ diff -urN iptables-1.2.11.old/extensions/libipt_ipp2p.c iptables-1.2.11/extensio
|
||||
+ info->debug = 1;
|
||||
+ break;
|
||||
+
|
||||
+ case 'h': /*cmd: udp*/
|
||||
+ if ((info->proto & IPP2P_PROTO_UDP) == IPP2P_PROTO_UDP)
|
||||
+ exit_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: --udp may only be specified once!");
|
||||
+
|
||||
+ if (invert) exit_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
|
||||
+ info->proto += IPP2P_PROTO_UDP;
|
||||
+ break;
|
||||
+
|
||||
+
|
||||
+ case 'i': /*cmd: tcp*/
|
||||
+ if ((info->proto & IPP2P_PROTO_TCP) == IPP2P_PROTO_TCP)
|
||||
+ exit_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: --tcp may only be specified once!");
|
||||
+ if (invert) exit_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
|
||||
+ info->proto += IPP2P_PROTO_TCP;
|
||||
+ break;
|
||||
+
|
||||
+
|
||||
+ default:
|
||||
+ exit_error(PARAMETER_PROBLEM,
|
||||
+ "\nipp2p-parameter problem: for ipp2p usage type: iptables -m ipp2p --help\n");
|
||||
@ -425,8 +401,6 @@ diff -urN iptables-1.2.11.old/extensions/libipt_ipp2p.c iptables-1.2.11/extensio
|
||||
+ if ((info->cmd & IPP2P_SOUL) == IPP2P_SOUL) printf(" --soul");
|
||||
+ if ((info->cmd & IPP2P_WINMX) == IPP2P_WINMX) printf(" --winmx");
|
||||
+ if ((info->cmd & IPP2P_ARES) == IPP2P_ARES) printf(" --ares");
|
||||
+ if ((info->proto & IPP2P_PROTO_UDP) == IPP2P_PROTO_UDP) printf(" --udp");
|
||||
+ if ((info->proto & IPP2P_PROTO_TCP) == IPP2P_PROTO_TCP) printf(" --tcp");
|
||||
+ if (info->debug != 0) printf(" --debug");
|
||||
+ printf(" ");
|
||||
+}
|
||||
@ -453,28 +427,27 @@ diff -urN iptables-1.2.11.old/extensions/libipt_ipp2p.c iptables-1.2.11/extensio
|
||||
+ if ((info->cmd & IPP2P_SOUL) == IPP2P_SOUL) printf("--soul ");
|
||||
+ if ((info->cmd & IPP2P_WINMX) == IPP2P_WINMX) printf("--winmx ");
|
||||
+ if ((info->cmd & IPP2P_ARES) == IPP2P_ARES) printf("--ares ");
|
||||
+ if ((info->proto & IPP2P_PROTO_UDP) == IPP2P_PROTO_UDP) printf("--udp ");
|
||||
+ if ((info->proto & IPP2P_PROTO_TCP) == IPP2P_PROTO_TCP) printf("--tcp ");
|
||||
+ if (info->debug != 0) printf("--debug ");
|
||||
+}
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
+static
|
||||
+struct iptables_match ipp2p
|
||||
+= { NULL,
|
||||
+ "ipp2p",
|
||||
+ IPTABLES_VERSION,
|
||||
+ IPT_ALIGN(sizeof(struct ipt_p2p_info)),
|
||||
+ IPT_ALIGN(sizeof(struct ipt_p2p_info)),
|
||||
+ &help,
|
||||
+ &init,
|
||||
+ &parse,
|
||||
+ &final_check,
|
||||
+ &print,
|
||||
+ &save,
|
||||
+ opts
|
||||
+static
|
||||
+struct iptables_match ipp2p=
|
||||
+{
|
||||
+ .next = NULL,
|
||||
+ .name = "ipp2p",
|
||||
+ .version = IPTABLES_VERSION,
|
||||
+ .size = IPT_ALIGN(sizeof(struct ipt_p2p_info)),
|
||||
+ .userspacesize = IPT_ALIGN(sizeof(struct ipt_p2p_info)),
|
||||
+ .help = &help,
|
||||
+ .init = &init,
|
||||
+ .parse = &parse,
|
||||
+ .final_check = &final_check,
|
||||
+ .print = &print,
|
||||
+ .save = &save,
|
||||
+ .extra_opts = opts
|
||||
+};
|
||||
+
|
||||
+
|
||||
@ -486,7 +459,7 @@ diff -urN iptables-1.2.11.old/extensions/libipt_ipp2p.c iptables-1.2.11/extensio
|
||||
+
|
||||
diff -urN iptables-1.2.11.old/extensions/Makefile iptables-1.2.11/extensions/Makefile
|
||||
--- iptables-1.2.11.old/extensions/Makefile 2004-06-17 12:22:54.000000000 +0200
|
||||
+++ iptables-1.2.11/extensions/Makefile 2005-03-01 17:51:19.000000000 +0100
|
||||
+++ iptables-1.2.11/extensions/Makefile 2005-03-12 00:50:12.000000000 +0100
|
||||
@@ -8,6 +8,10 @@
|
||||
PF_EXT_SLIB:=ah connlimit connmark conntrack dscp ecn esp helper icmp iprange length limit mac mark multiport owner physdev pkttype realm rpc sctp standard state tcp tcpmss tos ttl udp unclean CLASSIFY CONNMARK DNAT DSCP ECN LOG MARK MASQUERADE MIRROR NETMAP NOTRACK REDIRECT REJECT SAME SNAT TARPIT TCPMSS TOS TRACE TTL ULOG
|
||||
PF6_EXT_SLIB:=eui64 hl icmpv6 length limit mac mark multiport owner standard tcp udp HL LOG MARK TRACE
|
||||
@ -500,16 +473,15 @@ diff -urN iptables-1.2.11.old/extensions/Makefile iptables-1.2.11/extensions/Mak
|
||||
PF6_EXT_SLIB_OPTS:=$(foreach T,$(wildcard extensions/.*-test6),$(shell KERNEL_DIR=$(KERNEL_DIR) $(T)))
|
||||
diff -urN iptables-1.2.11.old/include/linux/netfilter_ipv4/ipt_ipp2p.h iptables-1.2.11/include/linux/netfilter_ipv4/ipt_ipp2p.h
|
||||
--- iptables-1.2.11.old/include/linux/netfilter_ipv4/ipt_ipp2p.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ iptables-1.2.11/include/linux/netfilter_ipv4/ipt_ipp2p.h 2005-03-01 17:48:03.000000000 +0100
|
||||
@@ -0,0 +1,34 @@
|
||||
+++ iptables-1.2.11/include/linux/netfilter_ipv4/ipt_ipp2p.h 2005-03-12 00:50:46.000000000 +0100
|
||||
@@ -0,0 +1,29 @@
|
||||
+#ifndef __IPT_IPP2P_H
|
||||
+#define __IPT_IPP2P_H
|
||||
+#define IPP2P_VERSION "0.7.1"
|
||||
+#define IPP2P_VERSION "0.7.4"
|
||||
+
|
||||
+struct ipt_p2p_info {
|
||||
+ int cmd;
|
||||
+ int debug;
|
||||
+ int proto;
|
||||
+};
|
||||
+
|
||||
+#endif //__IPT_IPP2P_H
|
||||
@ -532,7 +504,3 @@ diff -urN iptables-1.2.11.old/include/linux/netfilter_ipv4/ipt_ipp2p.h iptables-
|
||||
+#define IPP2P_WINMX 8192
|
||||
+#define IPP2P_ARES 16384
|
||||
+
|
||||
+#define IPP2P_PROTO_DEFAULT 1
|
||||
+#define IPP2P_PROTO_UDP 2
|
||||
+#define IPP2P_PROTO_TCP 4
|
||||
+
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user