Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 336261
b: refs/heads/master
c: f67caec
h: refs/heads/master
i:
  336259: a364e62
v: v3
  • Loading branch information
Neal Cardwell authored and David S. Miller committed Dec 9, 2012
1 parent 1050cca commit e309e2b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 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: 405c005949e47b6e91359159c24753519ded0c67
refs/heads/master: f67caec9068cee426ec23cf9005a1dee2ecad187
28 changes: 17 additions & 11 deletions trunk/net/ipv4/inet_diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,25 +432,31 @@ static int inet_diag_bc_run(const struct nlattr *_bc,
break;
}

if (cond->prefix_len == 0)
break;

if (op->code == INET_DIAG_BC_S_COND)
addr = entry->saddr;
else
addr = entry->daddr;

if (cond->family != AF_UNSPEC &&
cond->family != entry->family) {
if (entry->family == AF_INET6 &&
cond->family == AF_INET) {
if (addr[0] == 0 && addr[1] == 0 &&
addr[2] == htonl(0xffff) &&
bitstring_match(addr + 3,
cond->addr,
cond->prefix_len))
break;
}
yes = 0;
break;
}

if (cond->prefix_len == 0)
break;
if (bitstring_match(addr, cond->addr,
cond->prefix_len))
break;
if (entry->family == AF_INET6 &&
cond->family == AF_INET) {
if (addr[0] == 0 && addr[1] == 0 &&
addr[2] == htonl(0xffff) &&
bitstring_match(addr + 3, cond->addr,
cond->prefix_len))
break;
}
yes = 0;
break;
}
Expand Down

0 comments on commit e309e2b

Please sign in to comment.