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/ip6mr.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/ip6mr.c')
-rw-r--r-- | net/ipv6/ip6mr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 4532973f0dd4..08ea3f0b6e55 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c | |||
@@ -838,7 +838,7 @@ static void ip6mr_destroy_unres(struct mr6_table *mrt, struct mfc6_cache *c) | |||
838 | nlh->nlmsg_len = NLMSG_LENGTH(sizeof(struct nlmsgerr)); | 838 | nlh->nlmsg_len = NLMSG_LENGTH(sizeof(struct nlmsgerr)); |
839 | skb_trim(skb, nlh->nlmsg_len); | 839 | skb_trim(skb, nlh->nlmsg_len); |
840 | ((struct nlmsgerr *)NLMSG_DATA(nlh))->error = -ETIMEDOUT; | 840 | ((struct nlmsgerr *)NLMSG_DATA(nlh))->error = -ETIMEDOUT; |
841 | rtnl_unicast(skb, net, NETLINK_CB(skb).pid); | 841 | rtnl_unicast(skb, net, NETLINK_CB(skb).portid); |
842 | } else | 842 | } else |
843 | kfree_skb(skb); | 843 | kfree_skb(skb); |
844 | } | 844 | } |
@@ -1052,7 +1052,7 @@ static void ip6mr_cache_resolve(struct net *net, struct mr6_table *mrt, | |||
1052 | skb_trim(skb, nlh->nlmsg_len); | 1052 | skb_trim(skb, nlh->nlmsg_len); |
1053 | ((struct nlmsgerr *)NLMSG_DATA(nlh))->error = -EMSGSIZE; | 1053 | ((struct nlmsgerr *)NLMSG_DATA(nlh))->error = -EMSGSIZE; |
1054 | } | 1054 | } |
1055 | rtnl_unicast(skb, net, NETLINK_CB(skb).pid); | 1055 | rtnl_unicast(skb, net, NETLINK_CB(skb).portid); |
1056 | } else | 1056 | } else |
1057 | ip6_mr_forward(net, mrt, skb, c); | 1057 | ip6_mr_forward(net, mrt, skb, c); |
1058 | } | 1058 | } |
@@ -2202,12 +2202,12 @@ int ip6mr_get_route(struct net *net, | |||
2202 | } | 2202 | } |
2203 | 2203 | ||
2204 | static int ip6mr_fill_mroute(struct mr6_table *mrt, struct sk_buff *skb, | 2204 | static int ip6mr_fill_mroute(struct mr6_table *mrt, struct sk_buff *skb, |
2205 | u32 pid, u32 seq, struct mfc6_cache *c) | 2205 | u32 portid, u32 seq, struct mfc6_cache *c) |
2206 | { | 2206 | { |
2207 | struct nlmsghdr *nlh; | 2207 | struct nlmsghdr *nlh; |
2208 | struct rtmsg *rtm; | 2208 | struct rtmsg *rtm; |
2209 | 2209 | ||
2210 | nlh = nlmsg_put(skb, pid, seq, RTM_NEWROUTE, sizeof(*rtm), NLM_F_MULTI); | 2210 | nlh = nlmsg_put(skb, portid, seq, RTM_NEWROUTE, sizeof(*rtm), NLM_F_MULTI); |
2211 | if (nlh == NULL) | 2211 | if (nlh == NULL) |
2212 | return -EMSGSIZE; | 2212 | return -EMSGSIZE; |
2213 | 2213 | ||
@@ -2260,7 +2260,7 @@ static int ip6mr_rtm_dumproute(struct sk_buff *skb, struct netlink_callback *cb) | |||
2260 | if (e < s_e) | 2260 | if (e < s_e) |
2261 | goto next_entry; | 2261 | goto next_entry; |
2262 | if (ip6mr_fill_mroute(mrt, skb, | 2262 | if (ip6mr_fill_mroute(mrt, skb, |
2263 | NETLINK_CB(cb->skb).pid, | 2263 | NETLINK_CB(cb->skb).portid, |
2264 | cb->nlh->nlmsg_seq, | 2264 | cb->nlh->nlmsg_seq, |
2265 | mfc) < 0) | 2265 | mfc) < 0) |
2266 | goto done; | 2266 | goto done; |