add packages_10.03.2 in preparation for the 10.03.2 interim release
[10.03/packages.git] / utils / collectd / patches / 120-fix_kernel_2.6.37.patch
1 --- a/src/owniptc/libiptc.c
2 +++ b/src/owniptc/libiptc.c
3 @@ -81,11 +81,11 @@ static const char *hooknames[] = {
4  };
5  
6  /* Convenience structures */
7 -struct ipt_error_target
8 + struct ipt_error_target2
9  {
10         STRUCT_ENTRY_TARGET t;
11         char error[TABLE_MAXNAMELEN];
12 -};
13 +}; 
14  
15  struct chain_head;
16  struct rule_head;
17 @@ -1007,10 +1007,10 @@ static int parse_table(TC_HANDLE_T h)
18  /* Convenience structures */
19  struct iptcb_chain_start{
20         STRUCT_ENTRY e;
21 -       struct ipt_error_target name;
22 +       struct ipt_error_target2 name;
23  };
24  #define IPTCB_CHAIN_START_SIZE (sizeof(STRUCT_ENTRY) +                 \
25 -                                ALIGN(sizeof(struct ipt_error_target)))
26 +                                ALIGN(sizeof(struct ipt_error_target2)))
27  
28  struct iptcb_chain_foot {
29         STRUCT_ENTRY e;
30 @@ -1021,10 +1021,10 @@ struct iptcb_chain_foot {
31  
32  struct iptcb_chain_error {
33         STRUCT_ENTRY entry;
34 -       struct ipt_error_target target;
35 +       struct ipt_error_target2 target;
36  };
37  #define IPTCB_CHAIN_ERROR_SIZE (sizeof(STRUCT_ENTRY) +                 \
38 -                                ALIGN(sizeof(struct ipt_error_target)))
39 +                                ALIGN(sizeof(struct ipt_error_target2)))
40  
41  
42  
43 @@ -1069,7 +1069,7 @@ static int iptcc_compile_chain(TC_HANDLE
44                 head->e.next_offset = IPTCB_CHAIN_START_SIZE;
45                 strcpy(head->name.t.u.user.name, ERROR_TARGET);
46                 head->name.t.u.target_size = 
47 -                               ALIGN(sizeof(struct ipt_error_target));
48 +                               ALIGN(sizeof(struct ipt_error_target2));
49                 strcpy(head->name.error, c->name);
50         } else {
51                 repl->hook_entry[c->hooknum-1] = c->head_offset;        
52 @@ -1113,7 +1113,7 @@ static int iptcc_compile_chain_offsets(T
53         if (!iptcc_is_builtin(c))  {
54                 /* Chain has header */
55                 *offset += sizeof(STRUCT_ENTRY) 
56 -                            + ALIGN(sizeof(struct ipt_error_target));
57 +                            + ALIGN(sizeof(struct ipt_error_target2));
58                 (*num)++;
59         }
60  
61 @@ -1153,7 +1153,7 @@ static int iptcc_compile_table_prep(TC_H
62         /* Append one error rule at end of chain */
63         num++;
64         offset += sizeof(STRUCT_ENTRY)
65 -                 + ALIGN(sizeof(struct ipt_error_target));
66 +                 + ALIGN(sizeof(struct ipt_error_target2));
67  
68         /* ruleset size is now in offset */
69         *size = offset;
70 @@ -1177,7 +1177,7 @@ static int iptcc_compile_table(TC_HANDLE
71         error->entry.target_offset = sizeof(STRUCT_ENTRY);
72         error->entry.next_offset = IPTCB_CHAIN_ERROR_SIZE;
73         error->target.t.u.user.target_size = 
74 -               ALIGN(sizeof(struct ipt_error_target));
75 +               ALIGN(sizeof(struct ipt_error_target2));
76         strcpy((char *)&error->target.t.u.user.name, ERROR_TARGET);
77         strcpy((char *)&error->target.error, "ERROR");
78