diff options
author | Bart De Schuymer <bdschuym@pandora.be> | 2006-01-23 19:38:49 +0000 |
---|---|---|
committer | Bart De Schuymer <bdschuym@pandora.be> | 2006-01-23 19:38:49 +0000 |
commit | 7587ebea0c2a12080d399a502ff157db5f61500f (patch) | |
tree | c43c836ff259bd5d6c01e3b013bfc1873395d143 /userspace/ebtables2/libebtc.c | |
parent | 0383d022338effed36157da366a3307f56a3814b (diff) |
init hook_mask when no udc
Diffstat (limited to 'userspace/ebtables2/libebtc.c')
-rw-r--r-- | userspace/ebtables2/libebtc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/userspace/ebtables2/libebtc.c b/userspace/ebtables2/libebtc.c index a2801c7..4e429b6 100644 --- a/userspace/ebtables2/libebtc.c +++ b/userspace/ebtables2/libebtc.c @@ -990,7 +990,12 @@ void ebt_check_for_loops(struct ebt_u_replace *replace) for (i = 0; i < replace->num_chains; i++) { if (!(entries = replace->chains[i])) continue; - entries->hook_mask = 0; + if (i < NF_BR_NUMHOOKS) + /* (1 << NF_BR_NUMHOOKS) implies it's a standard chain + * (usefull in the final_check() funtions) */ + entries->hook_mask = (1 << i) | (1 << NF_BR_NUMHOOKS); + else + entries->hook_mask = 0; } if (replace->num_chains == NF_BR_NUMHOOKS) return; @@ -1002,9 +1007,6 @@ void ebt_check_for_loops(struct ebt_u_replace *replace) for (i = 0; i < NF_BR_NUMHOOKS; i++) { if (!(entries = replace->chains[i])) continue; - /* (1 << NF_BR_NUMHOOKS) implies it's a standard chain - * (usefull in the final_check() funtions) */ - entries->hook_mask = (1 << i) | (1 << NF_BR_NUMHOOKS); chain_nr = i; e = entries->entries->next; |