Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41967
b: refs/heads/master
c: 1f072c9
h: refs/heads/master
i:
  41965: c48287b
  41963: ebe5288
  41959: 29bcb53
  41951: 81d7c51
v: v3
  • Loading branch information
Al Viro authored and David S. Miller committed Dec 3, 2006
1 parent 8c1b348 commit 1f52af8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e4fd77deac764e17cb1eab8661bcf1413204d04d
refs/heads/master: 1f072c96fdf1a0caa11c6e8078dd96925bd02db5
10 changes: 5 additions & 5 deletions trunk/net/bridge/netfilter/ebtables.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 1f52af8

Please sign in to comment.