]> git.pld-linux.org Git - packages/iptables.git/commitdiff
- updated for xtables (iptables 1.4.1)
authorzbyniu <zbyniu@pld-linux.org>
Wed, 21 May 2008 21:50:13 +0000 (21:50 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    iptables-account.patch -> 1.3
    iptables-glibc28.patch -> 1.2
    iptables-layer7.patch -> 1.3
    iptables-old-1.3.7.patch -> 1.3

iptables-account.patch
iptables-glibc28.patch
iptables-layer7.patch
iptables-old-1.3.7.patch

index 8f8abb41f822e9a7d2a34a25bbdc2fe6fd823962..f93985a992f6bd1167c600b3569769184db42f79 100644 (file)
@@ -1,6 +1,6 @@
 --- /dev/null  2005-12-16 15:49:47.000000000 +0100
 +++ iptables-1.3.8/extensions/libipt_account.c 2007-07-21 19:13:28.000000000 +0200
-@@ -0,0 +1,275 @@
+@@ -0,0 +1,279 @@
 +/* Copyright (c) 2004-2007 Piotr 'QuakeR' Gasidlo <quaker@barbara.eu.org>
 + *
 + * This program is free software; you can redistribute it and/or modify
 +  ((unsigned char *)&addr)[0]
 +#endif
 +        
++int parseip(const char *parameter, u_int32_t *ip);
++int valid_netmask(u_int32_t netmask);
++int valid_network_and_netmask(struct t_ipt_account_info *info);
++
 +static void help(void) {
 +  printf(
 +      "account v%s options:\n"
@@ -37,7 +41,7 @@
 +      "       table will colect only short statistics (only total counters\n"
 +      "       without splitting it into protocols.\n"
 +  , 
-+  IPTABLES_VERSION);
++  XTABLES_VERSION);
 +};
 +
 +static struct option opts[] = {
 +    printf("--ashort ");
 +}
 +  
-+static struct iptables_match account = {
++static struct xtables_match account = {
 +  .next = NULL,
 +  .name = "account",
-+  .version = IPTABLES_VERSION,
++  .version = XTABLES_VERSION,
 +  .size = IPT_ALIGN(sizeof(struct t_ipt_account_info)),
 +  .userspacesize = IPT_ALIGN(sizeof(struct t_ipt_account_info)),
 +  .help = &help,
 +/* Function which registers match */
 +void _init(void)
 +{
-+  register_match(&account);
++  xtables_register_match(&account);
 +}
 --- /dev/null  2005-12-16 15:49:47.000000000 +0100
 +++ iptables-1.3.8/extensions/.account-test    2007-09-09 02:11:13.530174250 +0200
index 0fe062fea80797ddfce59f7da0935eb9664b3510..f2f91c9e84d03bd48896ab58bf868755ffca8cfe 100644 (file)
  
  int
  ipv6_prefix_length(const struct in6_addr *a)
---- iptables-1.4.0/ip6tables.c~        2007-12-22 12:44:18.000000000 +0000
-+++ iptables-1.4.0/ip6tables.c 2008-05-04 22:18:07.976519241 +0000
-@@ -678,7 +678,11 @@
-       for (i = 0, j = 0; i < n; i++) {
-               int k;
-               for (k = 0; k < 4; k++)
+--- iptables-1.4.1/xtables.c~  2008-05-19 12:50:30.000000000 +0200
++++ iptables-1.4.1/xtables.c   2008-05-21 23:05:57.235380593 +0200
+@@ -1178,7 +1178,11 @@ void ip6parse_hostnetworkmask(const char
+       n = *naddrs;
+       for (i = 0, j = 0; i < n; ++i) {
+               for (k = 0; k < 4; ++k)
 +#if __GLIBC_PREREQ(2, 8)
 +                      addrp[j].__in6_u.__u6_addr32[k] &= maskp->__in6_u.__u6_addr32[k];
 +#else
                        addrp[j].in6_u.u6_addr32[k] &= maskp->in6_u.u6_addr32[k];
 +#endif
-               j++;
-               for (k = 0; k < j - 1; k++) {
+               ++j;
+               for (k = 0; k < j - 1; ++k)
                        if (IN6_ARE_ADDR_EQUAL(&addrp[k], &addrp[j - 1])) {
index 47527633cb5fb551b1adee5a2034f7f09e61e0aa..8929f1db4aed684ca9830d24d77b5afd3fe614e9 100644 (file)
@@ -7,7 +7,7 @@ diff -Nurp iptables-1.3.8/extensions/.layer7-test iptables-1.3.8-layer7/extensio
 diff -Nurp iptables-1.3.8/extensions/libipt_layer7.c iptables-1.3.8-layer7/extensions/libipt_layer7.c
 --- iptables-1.3.8/extensions/libipt_layer7.c  1969-12-31 18:00:00.000000000 -0600
 +++ iptables-1.3.8-layer7/extensions/libipt_layer7.c   2007-07-04 19:23:04.000000000 -0500
-@@ -0,0 +1,394 @@
+@@ -0,0 +1,397 @@
 +/* 
 +   Shared library add-on to iptables to add layer 7 matching support. 
 +  
@@ -40,6 +40,9 @@ diff -Nurp iptables-1.3.8/extensions/libipt_layer7.c iptables-1.3.8-layer7/exten
 +
 +static char l7dir[MAX_FN_LEN] = "\0";
 +
++int parse_protocol_file(char * filename, const char * protoname, struct xt_layer7_info *info);
++char ** readl7dir(char * dirname);
++
 +/* Function which prints out usage message. */
 +static void help(void)
 +{
@@ -48,7 +51,7 @@ diff -Nurp iptables-1.3.8/extensions/libipt_layer7.c iptables-1.3.8-layer7/exten
 +      "--l7dir <directory>  : Look for patterns here instead of /etc/l7-protocols/\n"
 +      "                       (--l7dir must be specified before --l7proto if used!)\n"
 +      "--l7proto [!] <name> : Match the protocol defined in /etc/l7-protocols/name.pat\n",
-+      IPTABLES_VERSION);
++      XTABLES_VERSION);
 +      fputc('\n', stdout);
 +}
 +
@@ -385,9 +388,9 @@ diff -Nurp iptables-1.3.8/extensions/libipt_layer7.c iptables-1.3.8-layer7/exten
 +        printf("--l7proto %s%s ", (info->invert)   ? "! ": "", info->protocol);
 +}
 +
-+static struct iptables_match layer7 = { 
++static struct xtables_match layer7 = { 
 +    .name          = "layer7",
-+    .version       = IPTABLES_VERSION,
++    .version       = XTABLES_VERSION,
 +    .size          = IPT_ALIGN(sizeof(struct xt_layer7_info)),
 +    .userspacesize = IPT_ALIGN(sizeof(struct xt_layer7_info)),
 +    .help          = &help,
@@ -400,7 +403,7 @@ diff -Nurp iptables-1.3.8/extensions/libipt_layer7.c iptables-1.3.8-layer7/exten
 +
 +void _init(void)
 +{
-+      register_match(&layer7);
++      xtables_register_match(&layer7);
 +}
 diff -Nurp iptables-1.3.8/extensions/libipt_layer7.man iptables-1.3.8-layer7/extensions/libipt_layer7.man
 --- iptables-1.3.8/extensions/libipt_layer7.man        1969-12-31 18:00:00.000000000 -0600
index b099501df3c71f228d486f62a70c468c98abf7cc..91e3651940906eb27ce36850c92911a3b681b11e 100644 (file)
 +              "  --strict"
 +              "\t\t\ta flag to force the drop of packets\n"
 +              "\t\t\t\tnot containing \"get\" portmapper requests.\n",
-+              IPTABLES_VERSION);
++              XTABLES_VERSION);
 +}
 +
 +
 +}
 +
 +
-+static struct iptables_match rpcstruct = { 
++static struct xtables_match rpcstruct = { 
 +      .next           = NULL,
 +      .name           = "rpc",
-+      .version        = IPTABLES_VERSION,
++      .version        = XTABLES_VERSION,
 +      .size           = IPT_ALIGN(sizeof(struct ipt_rpc_info)),
 +      .userspacesize  = IPT_ALIGN(sizeof(struct ipt_rpc_info)),
 +      .help           = &help,
 +
 +void _init(void)
 +{
-+      register_match(&rpcstruct);
++      xtables_register_match(&rpcstruct);
 +}
 +
 --- /dev/null  2005-12-16 15:49:47.000000000 +0100
 +
 +              if (strlen(optarg) > sizeof(route_info->oif) - 1)
 +                      exit_error(PARAMETER_PROBLEM,
-+                                 "Maximum interface name length %u",
++                                 "Maximum interface name length %lu",
 +                                 sizeof(route_info->oif) - 1);
 +
 +              strcpy(route_info->oif, optarg);
 +
 +              if (strlen(optarg) > sizeof(route_info->iif) - 1)
 +                      exit_error(PARAMETER_PROBLEM,
-+                                 "Maximum interface name length %u",
++                                 "Maximum interface name length %lu",
 +                                 sizeof(route_info->iif) - 1);
 +
 +              strcpy(route_info->iif, optarg);
 +}
 +
 +
-+static struct iptables_target route = { 
++static struct xtables_target route = { 
 +      .next           = NULL,
 +      .name           = "ROUTE",
-+      .version        = IPTABLES_VERSION,
++      .version        = XTABLES_VERSION,
 +      .size           = IPT_ALIGN(sizeof(struct ipt_route_target_info)),
 +      .userspacesize  = IPT_ALIGN(sizeof(struct ipt_route_target_info)),
 +      .help           = &help,
 +
 +void _init(void)
 +{
-+      register_target(&route);
++      xtables_register_target(&route);
 +}
 --- /dev/null  2005-12-16 15:49:47.000000000 +0100
 +++ iptables-1.3.8/extensions/libipt_ROUTE.man 2006-12-04 12:15:20.000000000 +0100
 +
 +              if (strlen(optarg) > sizeof(route_info->oif) - 1)
 +                      exit_error(PARAMETER_PROBLEM,
-+                                 "Maximum interface name length %u",
++                                 "Maximum interface name length %lu",
 +                                 sizeof(route_info->oif) - 1);
 +
 +              strcpy(route_info->oif, optarg);
 +}
 +
 +
-+static struct ip6tables_target route = { 
++static struct xtables_target route = { 
 +      .name           = "ROUTE",
-+      .version        = IPTABLES_VERSION,
++      .version        = XTABLES_VERSION,
 +      .size           = IP6T_ALIGN(sizeof(struct ip6t_route_target_info)),
 +      .userspacesize  = IP6T_ALIGN(sizeof(struct ip6t_route_target_info)),
 +      .help           = &help,
 +
 +void _init(void)
 +{
-+      register_target6(&route);
++      xtables_register_target(&route);
 +}
 --- /dev/null  2005-12-16 15:49:47.000000000 +0100
 +++ iptables-1.3.8/extensions/libip6t_ROUTE.man        2006-12-04 12:15:20.000000000 +0100
This page took 0.140701 seconds and 4 git commands to generate.