Also read addresses from "ipv6-prefix-assignment" ifstatus table
[project/firewall3.git] / forwards.c
index babf5e8..fad347e 100644 (file)
@@ -86,9 +86,11 @@ fw3_load_forwards(struct fw3_state *state, struct uci_package *p)
                        continue;
                }
 
+               /* NB: forward family... */
                if (forward->_dest)
                {
-                       setbit(forward->_dest->flags, FW3_TARGET_ACCEPT);
+                       setbit(forward->_dest->flags[0], FW3_FLAG_ACCEPT);
+                       setbit(forward->_dest->flags[1], FW3_FLAG_ACCEPT);
 
                        if (forward->_src &&
                            (forward->_src->conntrack || forward->_dest->conntrack))
@@ -121,8 +123,8 @@ static void print_target(struct fw3_forward *forward)
 }
 
 static void
-print_forward(enum fw3_table table, enum fw3_family family,
-              struct fw3_forward *forward)
+print_forward(struct fw3_forward *forward, enum fw3_family family,
+              enum fw3_table table)
 {
        const char *s, *d;
 
@@ -150,11 +152,11 @@ print_forward(enum fw3_table table, enum fw3_family family,
 }
 
 void
-fw3_print_forwards(enum fw3_table table, enum fw3_family family,
-                   struct fw3_state *state)
+fw3_print_forwards(struct fw3_state *state, enum fw3_family family,
+                   enum fw3_table table)
 {
        struct fw3_forward *forward;
 
        list_for_each_entry(forward, &state->forwards, list)
-               print_forward(table, family, forward);
+               print_forward(forward, family, table);
 }