Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299937
b: refs/heads/master
c: 62ad6fc
h: refs/heads/master
i:
  299935: 061ec06
v: v3
  • Loading branch information
Shan Wei authored and David S. Miller committed Apr 26, 2012
1 parent 95f2277 commit 90a940a
Show file tree
Hide file tree
Showing 3 changed files with 11 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: 202149265770426f0965557ffa0b500fbbd701dd
refs/heads/master: 62ad6fcd743792bf294f2a7ba26ab8f462065150
2 changes: 1 addition & 1 deletion trunk/net/ipv4/inet_diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk,
goto rtattr_failure;

if (icsk == NULL) {
r->idiag_rqueue = r->idiag_wqueue = 0;
handler->idiag_get_info(sk, r, NULL);
goto out;
}

Expand Down
9 changes: 9 additions & 0 deletions trunk/net/ipv4/udp_diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,17 @@ static int udp_diag_dump_one(struct sk_buff *in_skb, const struct nlmsghdr *nlh,
return udp_dump_one(&udp_table, in_skb, nlh, req);
}

static void udp_diag_get_info(struct sock *sk, struct inet_diag_msg *r,
void *info)
{
r->idiag_rqueue = sk_rmem_alloc_get(sk);
r->idiag_wqueue = sk_wmem_alloc_get(sk);
}

static const struct inet_diag_handler udp_diag_handler = {
.dump = udp_diag_dump,
.dump_one = udp_diag_dump_one,
.idiag_get_info = udp_diag_get_info,
.idiag_type = IPPROTO_UDP,
};

Expand All @@ -167,6 +175,7 @@ static int udplite_diag_dump_one(struct sk_buff *in_skb, const struct nlmsghdr *
static const struct inet_diag_handler udplite_diag_handler = {
.dump = udplite_diag_dump,
.dump_one = udplite_diag_dump_one,
.idiag_get_info = udp_diag_get_info,
.idiag_type = IPPROTO_UDPLITE,
};

Expand Down

0 comments on commit 90a940a

Please sign in to comment.