bugfixes in build - still can't build as the patch file is not right
[iptables.git] / copy-xid.patch
index 100cf99..1886b12 100644 (file)
@@ -1,14 +1,14 @@
-commit 12aa2a62d05523e66b104b3f6840c592309d3a05
+commit a796550d217a8fc06829cac7bad72ac1fe34f85d
 Author: S.Çağlar Onur <caglar@cs.princeton.edu>
 Date:   Sat Apr 3 01:17:41 2010 -0400
 
     copy-xid
 
 diff --git a/extensions/libxt_CLASSIFY.c b/extensions/libxt_CLASSIFY.c
-index 82b8f4e..09c15c0 100644
+index ab5127c..477790e 100644
 --- a/extensions/libxt_CLASSIFY.c
 +++ b/extensions/libxt_CLASSIFY.c
-@@ -15,11 +15,13 @@ CLASSIFY_help(void)
+@@ -16,11 +16,13 @@ CLASSIFY_help(void)
  {
        printf(
  "CLASSIFY target options:\n"
@@ -18,12 +18,12 @@ index 82b8f4e..09c15c0 100644
  }
  
  static const struct option CLASSIFY_opts[] = {
-       { "set-class", 1, NULL, '1' },
-+      { "add-mark", 0, 0, '2' },
-       { .name = NULL }
+       {.name = "set-class", .has_arg = true, .val = '1'},
++      {.name = "add-mark",  .has_arg = false, .val = '2'},
+       XT_GETOPT_TABLEEND,
  };
  
-@@ -42,6 +44,8 @@ CLASSIFY_parse(int c, char **argv, int invert, unsigned int *flags,
+@@ -43,6 +45,8 @@ CLASSIFY_parse(int c, char **argv, int invert, unsigned int *flags,
        struct xt_classify_target_info *clinfo
                = (struct xt_classify_target_info *)(*target)->data;
  
@@ -32,7 +32,7 @@ index 82b8f4e..09c15c0 100644
        switch (c) {
        case '1':
                if (CLASSIFY_string_to_priority(optarg, &clinfo->priority))
-@@ -53,6 +57,10 @@ CLASSIFY_parse(int c, char **argv, int invert, unsigned int *flags,
+@@ -54,6 +58,10 @@ CLASSIFY_parse(int c, char **argv, int invert, unsigned int *flags,
                *flags = 1;
                break;
  
@@ -43,7 +43,7 @@ index 82b8f4e..09c15c0 100644
        default:
                return 0;
        }
-@@ -83,6 +91,9 @@ CLASSIFY_print(const void *ip,
+@@ -84,6 +92,9 @@ CLASSIFY_print(const void *ip,
                (const struct xt_classify_target_info *)target->data;
        printf("CLASSIFY set ");
        CLASSIFY_print_class(clinfo->priority, numeric);
@@ -53,7 +53,7 @@ index 82b8f4e..09c15c0 100644
  }
  
  static void
-@@ -93,6 +104,9 @@ CLASSIFY_save(const void *ip, const struct xt_entry_target *target)
+@@ -94,6 +105,9 @@ CLASSIFY_save(const void *ip, const struct xt_entry_target *target)
  
        printf("--set-class %.4x:%.4x ",
               TC_H_MAJ(clinfo->priority)>>16, TC_H_MIN(clinfo->priority));
@@ -64,7 +64,7 @@ index 82b8f4e..09c15c0 100644
  
  static struct xtables_target classify_target = { 
 diff --git a/extensions/libxt_MARK.c b/extensions/libxt_MARK.c
-index dbfc7c0..db58a1b 100644
+index 39996d0..09e13ca 100644
 --- a/extensions/libxt_MARK.c
 +++ b/extensions/libxt_MARK.c
 @@ -19,6 +19,7 @@ enum {
@@ -85,11 +85,11 @@ index dbfc7c0..db58a1b 100644
  }
  
  static const struct option MARK_opts[] = {
-       { "set-mark", 1, NULL, '1' },
-       { "and-mark", 1, NULL, '2' },
-       { "or-mark", 1, NULL, '3' },
-+      { "copy-xid", 1, 0, '4' },
-       { .name = NULL }
+       {.name = "set-mark", .has_arg = true, .val = '1'},
+       {.name = "and-mark", .has_arg = true, .val = '2'},
+       {.name = "or-mark",  .has_arg = true, .val = '3'},
++      {.name = "copy-xid", .has_arg = true, .val = '4'},
+       XT_GETOPT_TABLEEND,
  };
  
 @@ -52,6 +55,7 @@ static const struct option mark_tg_opts[] = {
@@ -97,7 +97,7 @@ index dbfc7c0..db58a1b 100644
        {.name = "or-mark",   .has_arg = true, .val = '|'},
        {.name = "xor-mark",  .has_arg = true, .val = '^'},
 +      {.name = "copy-xid",  .has_arg = true, .val = '%'},
-       { .name = NULL }
+       XT_GETOPT_TABLEEND,
  };
  
 @@ -63,6 +67,7 @@ static void mark_tg_help(void)