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/decnet/dn_route.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/decnet/dn_route.c')
-rw-r--r-- | net/decnet/dn_route.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index c855e8d0738f..b57419cc41a4 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -1543,7 +1543,7 @@ static int dn_route_input(struct sk_buff *skb) | |||
1543 | return dn_route_input_slow(skb); | 1543 | return dn_route_input_slow(skb); |
1544 | } | 1544 | } |
1545 | 1545 | ||
1546 | static int dn_rt_fill_info(struct sk_buff *skb, u32 pid, u32 seq, | 1546 | static int dn_rt_fill_info(struct sk_buff *skb, u32 portid, u32 seq, |
1547 | int event, int nowait, unsigned int flags) | 1547 | int event, int nowait, unsigned int flags) |
1548 | { | 1548 | { |
1549 | struct dn_route *rt = (struct dn_route *)skb_dst(skb); | 1549 | struct dn_route *rt = (struct dn_route *)skb_dst(skb); |
@@ -1551,7 +1551,7 @@ static int dn_rt_fill_info(struct sk_buff *skb, u32 pid, u32 seq, | |||
1551 | struct nlmsghdr *nlh; | 1551 | struct nlmsghdr *nlh; |
1552 | long expires; | 1552 | long expires; |
1553 | 1553 | ||
1554 | nlh = nlmsg_put(skb, pid, seq, event, sizeof(*r), flags); | 1554 | nlh = nlmsg_put(skb, portid, seq, event, sizeof(*r), flags); |
1555 | if (!nlh) | 1555 | if (!nlh) |
1556 | return -EMSGSIZE; | 1556 | return -EMSGSIZE; |
1557 | 1557 | ||
@@ -1685,7 +1685,7 @@ static int dn_cache_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh, void | |||
1685 | if (rtm->rtm_flags & RTM_F_NOTIFY) | 1685 | if (rtm->rtm_flags & RTM_F_NOTIFY) |
1686 | rt->rt_flags |= RTCF_NOTIFY; | 1686 | rt->rt_flags |= RTCF_NOTIFY; |
1687 | 1687 | ||
1688 | err = dn_rt_fill_info(skb, NETLINK_CB(in_skb).pid, nlh->nlmsg_seq, RTM_NEWROUTE, 0, 0); | 1688 | err = dn_rt_fill_info(skb, NETLINK_CB(in_skb).portid, nlh->nlmsg_seq, RTM_NEWROUTE, 0, 0); |
1689 | 1689 | ||
1690 | if (err == 0) | 1690 | if (err == 0) |
1691 | goto out_free; | 1691 | goto out_free; |
@@ -1694,7 +1694,7 @@ static int dn_cache_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh, void | |||
1694 | goto out_free; | 1694 | goto out_free; |
1695 | } | 1695 | } |
1696 | 1696 | ||
1697 | return rtnl_unicast(skb, &init_net, NETLINK_CB(in_skb).pid); | 1697 | return rtnl_unicast(skb, &init_net, NETLINK_CB(in_skb).portid); |
1698 | 1698 | ||
1699 | out_free: | 1699 | out_free: |
1700 | kfree_skb(skb); | 1700 | kfree_skb(skb); |
@@ -1737,7 +1737,7 @@ int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb) | |||
1737 | if (idx < s_idx) | 1737 | if (idx < s_idx) |
1738 | continue; | 1738 | continue; |
1739 | skb_dst_set(skb, dst_clone(&rt->dst)); | 1739 | skb_dst_set(skb, dst_clone(&rt->dst)); |
1740 | if (dn_rt_fill_info(skb, NETLINK_CB(cb->skb).pid, | 1740 | if (dn_rt_fill_info(skb, NETLINK_CB(cb->skb).portid, |
1741 | cb->nlh->nlmsg_seq, RTM_NEWROUTE, | 1741 | cb->nlh->nlmsg_seq, RTM_NEWROUTE, |
1742 | 1, NLM_F_MULTI) <= 0) { | 1742 | 1, NLM_F_MULTI) <= 0) { |
1743 | skb_dst_drop(skb); | 1743 | skb_dst_drop(skb); |