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/ipv6/addrlabel.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/ipv6/addrlabel.c')
-rw-r--r-- | net/ipv6/addrlabel.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c index eb6a63632d3c..0b0171570d17 100644 --- a/net/ipv6/addrlabel.c +++ b/net/ipv6/addrlabel.c | |||
@@ -470,10 +470,10 @@ static void ip6addrlbl_putmsg(struct nlmsghdr *nlh, | |||
470 | static int ip6addrlbl_fill(struct sk_buff *skb, | 470 | static int ip6addrlbl_fill(struct sk_buff *skb, |
471 | struct ip6addrlbl_entry *p, | 471 | struct ip6addrlbl_entry *p, |
472 | u32 lseq, | 472 | u32 lseq, |
473 | u32 pid, u32 seq, int event, | 473 | u32 portid, u32 seq, int event, |
474 | unsigned int flags) | 474 | unsigned int flags) |
475 | { | 475 | { |
476 | struct nlmsghdr *nlh = nlmsg_put(skb, pid, seq, event, | 476 | struct nlmsghdr *nlh = nlmsg_put(skb, portid, seq, event, |
477 | sizeof(struct ifaddrlblmsg), flags); | 477 | sizeof(struct ifaddrlblmsg), flags); |
478 | if (!nlh) | 478 | if (!nlh) |
479 | return -EMSGSIZE; | 479 | return -EMSGSIZE; |
@@ -503,7 +503,7 @@ static int ip6addrlbl_dump(struct sk_buff *skb, struct netlink_callback *cb) | |||
503 | net_eq(ip6addrlbl_net(p), net)) { | 503 | net_eq(ip6addrlbl_net(p), net)) { |
504 | if ((err = ip6addrlbl_fill(skb, p, | 504 | if ((err = ip6addrlbl_fill(skb, p, |
505 | ip6addrlbl_table.seq, | 505 | ip6addrlbl_table.seq, |
506 | NETLINK_CB(cb->skb).pid, | 506 | NETLINK_CB(cb->skb).portid, |
507 | cb->nlh->nlmsg_seq, | 507 | cb->nlh->nlmsg_seq, |
508 | RTM_NEWADDRLABEL, | 508 | RTM_NEWADDRLABEL, |
509 | NLM_F_MULTI)) <= 0) | 509 | NLM_F_MULTI)) <= 0) |
@@ -574,7 +574,7 @@ static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr* nlh, | |||
574 | } | 574 | } |
575 | 575 | ||
576 | err = ip6addrlbl_fill(skb, p, lseq, | 576 | err = ip6addrlbl_fill(skb, p, lseq, |
577 | NETLINK_CB(in_skb).pid, nlh->nlmsg_seq, | 577 | NETLINK_CB(in_skb).portid, nlh->nlmsg_seq, |
578 | RTM_NEWADDRLABEL, 0); | 578 | RTM_NEWADDRLABEL, 0); |
579 | 579 | ||
580 | ip6addrlbl_put(p); | 580 | ip6addrlbl_put(p); |
@@ -585,7 +585,7 @@ static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr* nlh, | |||
585 | goto out; | 585 | goto out; |
586 | } | 586 | } |
587 | 587 | ||
588 | err = rtnl_unicast(skb, net, NETLINK_CB(in_skb).pid); | 588 | err = rtnl_unicast(skb, net, NETLINK_CB(in_skb).portid); |
589 | out: | 589 | out: |
590 | return err; | 590 | return err; |
591 | } | 591 | } |