diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-09-07 16:12:54 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-10 15:30:41 -0400 |
commit | 15e473046cb6e5d18a4d0057e61d76315230382b (patch) | |
tree | 893d2df5d46a6ce156933ac57a1398f0ad22b889 /net/ipv4/udp_diag.c | |
parent | 9f00d9776bc5beb92e8bfc884a7e96ddc5589e2e (diff) |
netlink: Rename pid to portid to avoid confusion
It is a frequent mistake to confuse the netlink port identifier with a
process identifier. Try to reduce this confusion by renaming fields
that hold port identifiers portid instead of pid.
I have carefully avoided changing the structures exported to
userspace to avoid changing the userspace API.
I have successfully built an allyesconfig kernel with this change.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/udp_diag.c')
-rw-r--r-- | net/ipv4/udp_diag.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/udp_diag.c b/net/ipv4/udp_diag.c index d2f336ea82ca..505b30ad9182 100644 --- a/net/ipv4/udp_diag.c +++ b/net/ipv4/udp_diag.c | |||
@@ -26,7 +26,7 @@ static int sk_diag_dump(struct sock *sk, struct sk_buff *skb, | |||
26 | 26 | ||
27 | return inet_sk_diag_fill(sk, NULL, skb, req, | 27 | return inet_sk_diag_fill(sk, NULL, skb, req, |
28 | sk_user_ns(NETLINK_CB(cb->skb).ssk), | 28 | sk_user_ns(NETLINK_CB(cb->skb).ssk), |
29 | NETLINK_CB(cb->skb).pid, | 29 | NETLINK_CB(cb->skb).portid, |
30 | cb->nlh->nlmsg_seq, NLM_F_MULTI, cb->nlh); | 30 | cb->nlh->nlmsg_seq, NLM_F_MULTI, cb->nlh); |
31 | } | 31 | } |
32 | 32 | ||
@@ -72,14 +72,14 @@ static int udp_dump_one(struct udp_table *tbl, struct sk_buff *in_skb, | |||
72 | 72 | ||
73 | err = inet_sk_diag_fill(sk, NULL, rep, req, | 73 | err = inet_sk_diag_fill(sk, NULL, rep, req, |
74 | sk_user_ns(NETLINK_CB(in_skb).ssk), | 74 | sk_user_ns(NETLINK_CB(in_skb).ssk), |
75 | NETLINK_CB(in_skb).pid, | 75 | NETLINK_CB(in_skb).portid, |
76 | nlh->nlmsg_seq, 0, nlh); | 76 | nlh->nlmsg_seq, 0, nlh); |
77 | if (err < 0) { | 77 | if (err < 0) { |
78 | WARN_ON(err == -EMSGSIZE); | 78 | WARN_ON(err == -EMSGSIZE); |
79 | kfree_skb(rep); | 79 | kfree_skb(rep); |
80 | goto out; | 80 | goto out; |
81 | } | 81 | } |
82 | err = netlink_unicast(net->diag_nlsk, rep, NETLINK_CB(in_skb).pid, | 82 | err = netlink_unicast(net->diag_nlsk, rep, NETLINK_CB(in_skb).portid, |
83 | MSG_DONTWAIT); | 83 | MSG_DONTWAIT); |
84 | if (err > 0) | 84 | if (err > 0) |
85 | err = 0; | 85 | err = 0; |