From 1f52af8db1c3ea77405ba2e3a8cfed4a18ee86de Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 30 Nov 2006 19:26:53 -0800 Subject: [PATCH] --- yaml --- r: 41967 b: refs/heads/master c: 1f072c96fdf1a0caa11c6e8078dd96925bd02db5 h: refs/heads/master i: 41965: c48287b2bb9f4b3fa7e4a3543d7ee53041769986 41963: ebe528801f5b874ef81f4a97a9cf49f897996a8d 41959: 29bcb5330f0a5341f38b4bfa079ce7b624442c49 41951: 81d7c517d5c3477dac32e5811fc08af99b6c3ab0 v: v3 --- [refs] | 2 +- trunk/net/bridge/netfilter/ebtables.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 27bcadb6089c..e8b9c18a0682 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e4fd77deac764e17cb1eab8661bcf1413204d04d +refs/heads/master: 1f072c96fdf1a0caa11c6e8078dd96925bd02db5 diff --git a/trunk/net/bridge/netfilter/ebtables.c b/trunk/net/bridge/netfilter/ebtables.c index 7ce190c21dd7..3e1bf716509a 100644 --- a/trunk/net/bridge/netfilter/ebtables.c +++ b/trunk/net/bridge/netfilter/ebtables.c @@ -792,22 +792,22 @@ static int translate_table(struct ebt_replace *repl, return ret; i = 0; - while (i < NF_BR_NUMHOOKS && !(repl->valid_hooks & (1 << i))) + while (i < NF_BR_NUMHOOKS && !newinfo->hook_entry[i]) i++; if (i == NF_BR_NUMHOOKS) { BUGPRINT("No valid hooks specified\n"); return -EINVAL; } - if (repl->hook_entry[i] != (struct ebt_entries *)repl->entries) { + if (newinfo->hook_entry[i] != (struct ebt_entries *)newinfo->entries) { BUGPRINT("Chains don't start at beginning\n"); return -EINVAL; } /* make sure chains are ordered after each other in same order as their corresponding hooks */ for (j = i + 1; j < NF_BR_NUMHOOKS; j++) { - if (!(repl->valid_hooks & (1 << j))) + if (!newinfo->hook_entry[j]) continue; - if ( repl->hook_entry[j] <= repl->hook_entry[i] ) { + if (newinfo->hook_entry[j] <= newinfo->hook_entry[i]) { BUGPRINT("Hook order must be followed\n"); return -EINVAL; } @@ -877,7 +877,7 @@ static int translate_table(struct ebt_replace *repl, /* Check for loops */ for (i = 0; i < NF_BR_NUMHOOKS; i++) - if (repl->valid_hooks & (1 << i)) + if (newinfo->hook_entry[i]) if (check_chainloops(newinfo->hook_entry[i], cl_s, udc_cnt, i, newinfo->entries)) { vfree(cl_s);