]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/patches/iptables-1.4.12-IMQ-test4.diff
iptables: update to 1.4.14.
[people/pmueller/ipfire-2.x.git] / src / patches / iptables-1.4.12-IMQ-test4.diff
similarity index 60%
rename from src/patches/iptables-1.4.6-imq_test1.patch
rename to src/patches/iptables-1.4.12-IMQ-test4.diff
index 2b4fb79cb02922bb1bc20a9db7c7c22b97f7960c..5ce17e1b4569ef564444e9b9c89559abdc6bb611 100644 (file)
@@ -1,14 +1,7 @@
-diff -Naurw iptables-1.4.1/extensions/.IMQ-testx iptables-1.4.1.imq/extensions/.IMQ-testx
---- iptables-1.4.1/extensions/.IMQ-testx       1969-12-31 21:00:00.000000000 -0300
-+++ iptables-1.4.1.imq/extensions/.IMQ-testx   2008-06-24 22:20:06.000000000 -0300
-@@ -0,0 +1,3 @@
-+#!/bin/sh
-+# True if IMQ target patch is applied.
-+[ -f $KERNEL_DIR/include/linux/netfilter/xt_IMQ.h ] && echo IMQ
-diff -Naurw iptables-1.4.1/extensions/libxt_IMQ.c iptables-1.4.1.imq/extensions/libxt_IMQ.c
---- iptables-1.4.1/extensions/libxt_IMQ.c      1969-12-31 21:00:00.000000000 -0300
-+++ iptables-1.4.1.imq/extensions/libxt_IMQ.c  2008-06-24 22:31:02.000000000 -0300
-@@ -0,0 +1,103 @@
+diff -Naur iptables-1.4.12.1/extensions/libxt_IMQ.c iptables-1.4.12.1-imq/extensions/libxt_IMQ.c
+--- iptables-1.4.12.1/extensions/libxt_IMQ.c   1970-01-01 02:00:00.000000000 +0200
++++ iptables-1.4.12.1-imq/extensions/libxt_IMQ.c       2011-09-30 13:53:21.000000000 +0300
+@@ -0,0 +1,105 @@
 +/* Shared library add-on to iptables to add IMQ target support. */
 +#include <stdio.h>
 +#include <string.h>
@@ -50,11 +43,13 @@ diff -Naurw iptables-1.4.1/extensions/libxt_IMQ.c iptables-1.4.1.imq/extensions/
 +      
 +      switch(c) {
 +      case '1':
-+              if (xtables_check_inverse(optarg, &invert, NULL, 0, argv))
++/*            if (xtables_check_inverse(optarg, &invert, NULL, 0, argv))
 +                      xtables_error(PARAMETER_PROBLEM,
-+                                 "Unexpected `!' for --todev");
++                                 "Unexpected `!' after --todev");
++*/
 +              mr->todev=atoi(optarg);
 +              break;
++
 +      default:
 +              return 0;
 +      }
@@ -76,7 +71,7 @@ diff -Naurw iptables-1.4.1/extensions/libxt_IMQ.c iptables-1.4.1.imq/extensions/
 +{
 +      struct xt_imq_info *mr = (struct xt_imq_info*)target->data;
 +
-+      printf("--todev %u", mr->todev);
++      printf(" --todev %u", mr->todev);
 +}
 +
 +static struct xtables_target imq_target = {
@@ -112,8 +107,28 @@ diff -Naurw iptables-1.4.1/extensions/libxt_IMQ.c iptables-1.4.1.imq/extensions/
 +      xtables_register_target(&imq_target);
 +      xtables_register_target(&imq_target6);
 +}
---- iptables-1.4.1.1/include/linux/netfilter/xt_IMQ.h  1970-01-01 02:00:00.000000000 +0200
-+++ iptables-1.4.1.1.new/include/linux/netfilter/xt_IMQ.h      2008-08-05 00:41:28.000000000 +0300
+diff -Naur iptables-1.4.12.1/extensions/libxt_IMQ.man iptables-1.4.12.1-imq/extensions/libxt_IMQ.man
+--- iptables-1.4.12.1/extensions/libxt_IMQ.man 1970-01-01 02:00:00.000000000 +0200
++++ iptables-1.4.12.1-imq/extensions/libxt_IMQ.man     2011-09-30 13:53:21.000000000 +0300
+@@ -0,0 +1,15 @@
++This target is used to redirect the traffic to the IMQ driver and you can apply
++QoS rules like HTB or CBQ.
++For example you can select only traffic comming from a specific interface or
++is going out on a specific interface.
++Also it permits to capture the traffic BEFORE NAT in the case of outgoing traffic
++or AFTER NAT in the case of incomming traffic.
++.TP
++\fB\-\-to\-dev\fP \fIvalue\fP
++Set the IMQ interface where to send this traffic
++.TP
++Example:
++.TP
++Redirect incomming traffic from interface eth0 to imq0 and outgoing traffic to imq1:
++iptables \-t mangle \-A FORWARD \-i eth0 \-j IMQ \-\-to\-dev 0
++iptables \-t mangle \-A FORWARD \-o eth0 \-j IMQ \-\-to\-dev 1
+diff -Naur iptables-1.4.12.1/include/linux/netfilter/xt_IMQ.h iptables-1.4.12.1-imq/include/linux/netfilter/xt_IMQ.h
+--- iptables-1.4.12.1/include/linux/netfilter/xt_IMQ.h 1970-01-01 02:00:00.000000000 +0200
++++ iptables-1.4.12.1-imq/include/linux/netfilter/xt_IMQ.h     2011-09-30 13:53:21.000000000 +0300
 @@ -0,0 +1,9 @@
 +#ifndef _XT_IMQ_H
 +#define _XT_IMQ_H