Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278497
b: refs/heads/master
c: d23deaa
h: refs/heads/master
i:
  278495: fd9e19e
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Dec 6, 2011
1 parent aca8fdb commit d8b9084
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 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: 25c4cd2b6dfd8e3d8efd8e85f167b66c032b80d9
refs/heads/master: d23deaa07b9b788e781a2253672cdc8b65b85e53
12 changes: 11 additions & 1 deletion trunk/net/ipv4/inet_diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,10 @@ static int __inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb,
continue;
}

if (r->sdiag_family != AF_UNSPEC &&
sk->sk_family != r->sdiag_family)
goto next_listen;

if (r->id.idiag_sport != inet->inet_sport &&
r->id.idiag_sport)
goto next_listen;
Expand Down Expand Up @@ -808,6 +812,9 @@ static int __inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb,
goto next_normal;
if (!(r->idiag_states & (1 << sk->sk_state)))
goto next_normal;
if (r->sdiag_family != AF_UNSPEC &&
sk->sk_family != r->sdiag_family)
goto next_normal;
if (r->id.idiag_sport != inet->inet_sport &&
r->id.idiag_sport)
goto next_normal;
Expand All @@ -830,6 +837,9 @@ static int __inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb,

if (num < s_num)
goto next_dying;
if (r->sdiag_family != AF_UNSPEC &&
tw->tw_family != r->sdiag_family)
goto next_dying;
if (r->id.idiag_sport != tw->tw_sport &&
r->id.idiag_sport)
goto next_dying;
Expand Down Expand Up @@ -873,7 +883,7 @@ static int inet_diag_dump_compat(struct sk_buff *skb, struct netlink_callback *c
struct nlattr *bc = NULL;
int hdrlen = sizeof(struct inet_diag_req_compat);

req.sdiag_family = rc->idiag_family;
req.sdiag_family = AF_UNSPEC; /* compatibility */
req.sdiag_protocol = inet_diag_type2proto(cb->nlh->nlmsg_type);
req.idiag_ext = rc->idiag_ext;
req.idiag_states = rc->idiag_states;
Expand Down

0 comments on commit d8b9084

Please sign in to comment.