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/core/fib_rules.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/core/fib_rules.c')
-rw-r--r-- | net/core/fib_rules.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index ab7db83236c9..58a4ba27dfe3 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c | |||
@@ -402,7 +402,7 @@ static int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) | |||
402 | if (unresolved) | 402 | if (unresolved) |
403 | ops->unresolved_rules++; | 403 | ops->unresolved_rules++; |
404 | 404 | ||
405 | notify_rule_change(RTM_NEWRULE, rule, ops, nlh, NETLINK_CB(skb).pid); | 405 | notify_rule_change(RTM_NEWRULE, rule, ops, nlh, NETLINK_CB(skb).portid); |
406 | flush_route_cache(ops); | 406 | flush_route_cache(ops); |
407 | rules_ops_put(ops); | 407 | rules_ops_put(ops); |
408 | return 0; | 408 | return 0; |
@@ -500,7 +500,7 @@ static int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) | |||
500 | } | 500 | } |
501 | 501 | ||
502 | notify_rule_change(RTM_DELRULE, rule, ops, nlh, | 502 | notify_rule_change(RTM_DELRULE, rule, ops, nlh, |
503 | NETLINK_CB(skb).pid); | 503 | NETLINK_CB(skb).portid); |
504 | if (ops->delete) | 504 | if (ops->delete) |
505 | ops->delete(rule); | 505 | ops->delete(rule); |
506 | fib_rule_put(rule); | 506 | fib_rule_put(rule); |
@@ -601,7 +601,7 @@ static int dump_rules(struct sk_buff *skb, struct netlink_callback *cb, | |||
601 | if (idx < cb->args[1]) | 601 | if (idx < cb->args[1]) |
602 | goto skip; | 602 | goto skip; |
603 | 603 | ||
604 | if (fib_nl_fill_rule(skb, rule, NETLINK_CB(cb->skb).pid, | 604 | if (fib_nl_fill_rule(skb, rule, NETLINK_CB(cb->skb).portid, |
605 | cb->nlh->nlmsg_seq, RTM_NEWRULE, | 605 | cb->nlh->nlmsg_seq, RTM_NEWRULE, |
606 | NLM_F_MULTI, ops) < 0) | 606 | NLM_F_MULTI, ops) < 0) |
607 | break; | 607 | break; |