Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44594
b: refs/heads/master
c: e1b4b9f
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro authored and David S. Miller committed Dec 14, 2006
1 parent 2a33bc6 commit a6ce187
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 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: a96be24679198469df28976c809575423e70d843
refs/heads/master: e1b4b9f3986b80d5785d91dbd8d72cfaf9fd1117
5 changes: 3 additions & 2 deletions trunk/net/ipv4/netfilter/arp_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ static int mark_source_chains(struct xt_table_info *newinfo,
for (;;) {
struct arpt_standard_target *t
= (void *)arpt_get_target(e);
int visited = e->comefrom & (1 << hook);

if (e->comefrom & (1 << NF_ARP_NUMHOOKS)) {
printk("arptables: loop hook %u pos %u %08X.\n",
Expand All @@ -368,11 +369,11 @@ static int mark_source_chains(struct xt_table_info *newinfo,
|= ((1 << hook) | (1 << NF_ARP_NUMHOOKS));

/* Unconditional return/END. */
if (e->target_offset == sizeof(struct arpt_entry)
if ((e->target_offset == sizeof(struct arpt_entry)
&& (strcmp(t->target.u.user.name,
ARPT_STANDARD_TARGET) == 0)
&& t->verdict < 0
&& unconditional(&e->arp)) {
&& unconditional(&e->arp)) || visited) {
unsigned int oldpos, size;

if (t->verdict < -NF_MAX_VERDICT - 1) {
Expand Down
5 changes: 3 additions & 2 deletions trunk/net/ipv4/netfilter/ip_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ mark_source_chains(struct xt_table_info *newinfo,
for (;;) {
struct ipt_standard_target *t
= (void *)ipt_get_target(e);
int visited = e->comefrom & (1 << hook);

if (e->comefrom & (1 << NF_IP_NUMHOOKS)) {
printk("iptables: loop hook %u pos %u %08X.\n",
Expand All @@ -394,11 +395,11 @@ mark_source_chains(struct xt_table_info *newinfo,
|= ((1 << hook) | (1 << NF_IP_NUMHOOKS));

/* Unconditional return/END. */
if (e->target_offset == sizeof(struct ipt_entry)
if ((e->target_offset == sizeof(struct ipt_entry)
&& (strcmp(t->target.u.user.name,
IPT_STANDARD_TARGET) == 0)
&& t->verdict < 0
&& unconditional(&e->ip)) {
&& unconditional(&e->ip)) || visited) {
unsigned int oldpos, size;

if (t->verdict < -NF_MAX_VERDICT - 1) {
Expand Down
5 changes: 3 additions & 2 deletions trunk/net/ipv6/netfilter/ip6_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ mark_source_chains(struct xt_table_info *newinfo,
unsigned int pos = newinfo->hook_entry[hook];
struct ip6t_entry *e
= (struct ip6t_entry *)(entry0 + pos);
int visited = e->comefrom & (1 << hook);

if (!(valid_hooks & (1 << hook)))
continue;
Expand All @@ -433,11 +434,11 @@ mark_source_chains(struct xt_table_info *newinfo,
|= ((1 << hook) | (1 << NF_IP6_NUMHOOKS));

/* Unconditional return/END. */
if (e->target_offset == sizeof(struct ip6t_entry)
if ((e->target_offset == sizeof(struct ip6t_entry)
&& (strcmp(t->target.u.user.name,
IP6T_STANDARD_TARGET) == 0)
&& t->verdict < 0
&& unconditional(&e->ipv6)) {
&& unconditional(&e->ipv6)) || visited) {
unsigned int oldpos, size;

if (t->verdict < -NF_MAX_VERDICT - 1) {
Expand Down

0 comments on commit a6ce187

Please sign in to comment.