Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278541
b: refs/heads/master
c: 87c22ea
h: refs/heads/master
i:
  278539: cc9b737
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Dec 9, 2011
1 parent ba5f45e commit 4ed741a
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 7b35eadd7eee2e0b42421ce3efbc30f1c3c745e5
refs/heads/master: 87c22ea52e1bb467f58b3e9a71509fccb70c7bd3
14 changes: 8 additions & 6 deletions trunk/net/ipv4/inet_diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,12 @@ static int bitstring_match(const __be32 *a1, const __be32 *a2, int bits)
}


static int inet_diag_bc_run(const void *bc, int len,
const struct inet_diag_entry *entry)
static int inet_diag_bc_run(const struct nlattr *_bc,
const struct inet_diag_entry *entry)
{
const void *bc = nla_data(_bc);
int len = nla_len(_bc);

while (len > 0) {
int yes = 1;
const struct inet_diag_bc_op *op = bc;
Expand Down Expand Up @@ -512,7 +515,7 @@ static int inet_csk_diag_dump(struct sock *sk,
entry.dport = ntohs(inet->inet_dport);
entry.userlocks = sk->sk_userlocks;

if (!inet_diag_bc_run(nla_data(bc), nla_len(bc), &entry))
if (!inet_diag_bc_run(bc, &entry))
return 0;
}

Expand Down Expand Up @@ -547,7 +550,7 @@ static int inet_twsk_diag_dump(struct inet_timewait_sock *tw,
entry.dport = ntohs(tw->tw_dport);
entry.userlocks = 0;

if (!inet_diag_bc_run(nla_data(bc), nla_len(bc), &entry))
if (!inet_diag_bc_run(bc, &entry))
return 0;
}

Expand Down Expand Up @@ -668,8 +671,7 @@ static int inet_diag_dump_reqs(struct sk_buff *skb, struct sock *sk,
&ireq->rmt_addr;
entry.dport = ntohs(ireq->rmt_port);

if (!inet_diag_bc_run(nla_data(bc),
nla_len(bc), &entry))
if (!inet_diag_bc_run(bc, &entry))
continue;
}

Expand Down

0 comments on commit 4ed741a

Please sign in to comment.