1 --- a/src/owniptc/libiptc.c
2 +++ b/src/owniptc/libiptc.c
3 @@ -81,11 +81,11 @@ static const char *hooknames[] = {
6 /* Convenience structures */
7 -struct ipt_error_target
8 + struct ipt_error_target2
10 STRUCT_ENTRY_TARGET t;
11 char error[TABLE_MAXNAMELEN];
17 @@ -1007,10 +1007,10 @@ static int parse_table(TC_HANDLE_T h)
18 /* Convenience structures */
19 struct iptcb_chain_start{
21 - struct ipt_error_target name;
22 + struct ipt_error_target2 name;
24 #define IPTCB_CHAIN_START_SIZE (sizeof(STRUCT_ENTRY) + \
25 - ALIGN(sizeof(struct ipt_error_target)))
26 + ALIGN(sizeof(struct ipt_error_target2)))
28 struct iptcb_chain_foot {
30 @@ -1021,10 +1021,10 @@ struct iptcb_chain_foot {
32 struct iptcb_chain_error {
34 - struct ipt_error_target target;
35 + struct ipt_error_target2 target;
37 #define IPTCB_CHAIN_ERROR_SIZE (sizeof(STRUCT_ENTRY) + \
38 - ALIGN(sizeof(struct ipt_error_target)))
39 + ALIGN(sizeof(struct ipt_error_target2)))
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);
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));
61 @@ -1153,7 +1153,7 @@ static int iptcc_compile_table_prep(TC_H
62 /* Append one error rule at end of chain */
64 offset += sizeof(STRUCT_ENTRY)
65 - + ALIGN(sizeof(struct ipt_error_target));
66 + + ALIGN(sizeof(struct ipt_error_target2));
68 /* ruleset size is now in 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");