aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-09-07 16:12:54 -0400
committerDavid S. Miller <davem@davemloft.net>2012-09-10 15:30:41 -0400
commit15e473046cb6e5d18a4d0057e61d76315230382b (patch)
tree893d2df5d46a6ce156933ac57a1398f0ad22b889 /net/ipv6
parent9f00d9776bc5beb92e8bfc884a7e96ddc5589e2e (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')
-rw-r--r--net/ipv6/addrconf.c32
-rw-r--r--net/ipv6/addrlabel.c10
-rw-r--r--net/ipv6/ip6mr.c10
-rw-r--r--net/ipv6/route.c20
4 files changed, 36 insertions, 36 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 572cb660837b..1237d5d037d8 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3534,12 +3534,12 @@ static inline int inet6_ifaddr_msgsize(void)
3534} 3534}
3535 3535
3536static int inet6_fill_ifaddr(struct sk_buff *skb, struct inet6_ifaddr *ifa, 3536static int inet6_fill_ifaddr(struct sk_buff *skb, struct inet6_ifaddr *ifa,
3537 u32 pid, u32 seq, int event, unsigned int flags) 3537 u32 portid, u32 seq, int event, unsigned int flags)
3538{ 3538{
3539 struct nlmsghdr *nlh; 3539 struct nlmsghdr *nlh;
3540 u32 preferred, valid; 3540 u32 preferred, valid;
3541 3541
3542 nlh = nlmsg_put(skb, pid, seq, event, sizeof(struct ifaddrmsg), flags); 3542 nlh = nlmsg_put(skb, portid, seq, event, sizeof(struct ifaddrmsg), flags);
3543 if (nlh == NULL) 3543 if (nlh == NULL)
3544 return -EMSGSIZE; 3544 return -EMSGSIZE;
3545 3545
@@ -3577,7 +3577,7 @@ static int inet6_fill_ifaddr(struct sk_buff *skb, struct inet6_ifaddr *ifa,
3577} 3577}
3578 3578
3579static int inet6_fill_ifmcaddr(struct sk_buff *skb, struct ifmcaddr6 *ifmca, 3579static int inet6_fill_ifmcaddr(struct sk_buff *skb, struct ifmcaddr6 *ifmca,
3580 u32 pid, u32 seq, int event, u16 flags) 3580 u32 portid, u32 seq, int event, u16 flags)
3581{ 3581{
3582 struct nlmsghdr *nlh; 3582 struct nlmsghdr *nlh;
3583 u8 scope = RT_SCOPE_UNIVERSE; 3583 u8 scope = RT_SCOPE_UNIVERSE;
@@ -3586,7 +3586,7 @@ static int inet6_fill_ifmcaddr(struct sk_buff *skb, struct ifmcaddr6 *ifmca,
3586 if (ipv6_addr_scope(&ifmca->mca_addr) & IFA_SITE) 3586 if (ipv6_addr_scope(&ifmca->mca_addr) & IFA_SITE)
3587 scope = RT_SCOPE_SITE; 3587 scope = RT_SCOPE_SITE;
3588 3588
3589 nlh = nlmsg_put(skb, pid, seq, event, sizeof(struct ifaddrmsg), flags); 3589 nlh = nlmsg_put(skb, portid, seq, event, sizeof(struct ifaddrmsg), flags);
3590 if (nlh == NULL) 3590 if (nlh == NULL)
3591 return -EMSGSIZE; 3591 return -EMSGSIZE;
3592 3592
@@ -3602,7 +3602,7 @@ static int inet6_fill_ifmcaddr(struct sk_buff *skb, struct ifmcaddr6 *ifmca,
3602} 3602}
3603 3603
3604static int inet6_fill_ifacaddr(struct sk_buff *skb, struct ifacaddr6 *ifaca, 3604static int inet6_fill_ifacaddr(struct sk_buff *skb, struct ifacaddr6 *ifaca,
3605 u32 pid, u32 seq, int event, unsigned int flags) 3605 u32 portid, u32 seq, int event, unsigned int flags)
3606{ 3606{
3607 struct nlmsghdr *nlh; 3607 struct nlmsghdr *nlh;
3608 u8 scope = RT_SCOPE_UNIVERSE; 3608 u8 scope = RT_SCOPE_UNIVERSE;
@@ -3611,7 +3611,7 @@ static int inet6_fill_ifacaddr(struct sk_buff *skb, struct ifacaddr6 *ifaca,
3611 if (ipv6_addr_scope(&ifaca->aca_addr) & IFA_SITE) 3611 if (ipv6_addr_scope(&ifaca->aca_addr) & IFA_SITE)
3612 scope = RT_SCOPE_SITE; 3612 scope = RT_SCOPE_SITE;
3613 3613
3614 nlh = nlmsg_put(skb, pid, seq, event, sizeof(struct ifaddrmsg), flags); 3614 nlh = nlmsg_put(skb, portid, seq, event, sizeof(struct ifaddrmsg), flags);
3615 if (nlh == NULL) 3615 if (nlh == NULL)
3616 return -EMSGSIZE; 3616 return -EMSGSIZE;
3617 3617
@@ -3652,7 +3652,7 @@ static int in6_dump_addrs(struct inet6_dev *idev, struct sk_buff *skb,
3652 if (++ip_idx < s_ip_idx) 3652 if (++ip_idx < s_ip_idx)
3653 continue; 3653 continue;
3654 err = inet6_fill_ifaddr(skb, ifa, 3654 err = inet6_fill_ifaddr(skb, ifa,
3655 NETLINK_CB(cb->skb).pid, 3655 NETLINK_CB(cb->skb).portid,
3656 cb->nlh->nlmsg_seq, 3656 cb->nlh->nlmsg_seq,
3657 RTM_NEWADDR, 3657 RTM_NEWADDR,
3658 NLM_F_MULTI); 3658 NLM_F_MULTI);
@@ -3668,7 +3668,7 @@ static int in6_dump_addrs(struct inet6_dev *idev, struct sk_buff *skb,
3668 if (ip_idx < s_ip_idx) 3668 if (ip_idx < s_ip_idx)
3669 continue; 3669 continue;
3670 err = inet6_fill_ifmcaddr(skb, ifmca, 3670 err = inet6_fill_ifmcaddr(skb, ifmca,
3671 NETLINK_CB(cb->skb).pid, 3671 NETLINK_CB(cb->skb).portid,
3672 cb->nlh->nlmsg_seq, 3672 cb->nlh->nlmsg_seq,
3673 RTM_GETMULTICAST, 3673 RTM_GETMULTICAST,
3674 NLM_F_MULTI); 3674 NLM_F_MULTI);
@@ -3683,7 +3683,7 @@ static int in6_dump_addrs(struct inet6_dev *idev, struct sk_buff *skb,
3683 if (ip_idx < s_ip_idx) 3683 if (ip_idx < s_ip_idx)
3684 continue; 3684 continue;
3685 err = inet6_fill_ifacaddr(skb, ifaca, 3685 err = inet6_fill_ifacaddr(skb, ifaca,
3686 NETLINK_CB(cb->skb).pid, 3686 NETLINK_CB(cb->skb).portid,
3687 cb->nlh->nlmsg_seq, 3687 cb->nlh->nlmsg_seq,
3688 RTM_GETANYCAST, 3688 RTM_GETANYCAST,
3689 NLM_F_MULTI); 3689 NLM_F_MULTI);
@@ -3805,7 +3805,7 @@ static int inet6_rtm_getaddr(struct sk_buff *in_skb, struct nlmsghdr *nlh,
3805 goto errout_ifa; 3805 goto errout_ifa;
3806 } 3806 }
3807 3807
3808 err = inet6_fill_ifaddr(skb, ifa, NETLINK_CB(in_skb).pid, 3808 err = inet6_fill_ifaddr(skb, ifa, NETLINK_CB(in_skb).portid,
3809 nlh->nlmsg_seq, RTM_NEWADDR, 0); 3809 nlh->nlmsg_seq, RTM_NEWADDR, 0);
3810 if (err < 0) { 3810 if (err < 0) {
3811 /* -EMSGSIZE implies BUG in inet6_ifaddr_msgsize() */ 3811 /* -EMSGSIZE implies BUG in inet6_ifaddr_msgsize() */
@@ -3813,7 +3813,7 @@ static int inet6_rtm_getaddr(struct sk_buff *in_skb, struct nlmsghdr *nlh,
3813 kfree_skb(skb); 3813 kfree_skb(skb);
3814 goto errout_ifa; 3814 goto errout_ifa;
3815 } 3815 }
3816 err = rtnl_unicast(skb, net, NETLINK_CB(in_skb).pid); 3816 err = rtnl_unicast(skb, net, NETLINK_CB(in_skb).portid);
3817errout_ifa: 3817errout_ifa:
3818 in6_ifa_put(ifa); 3818 in6_ifa_put(ifa);
3819errout: 3819errout:
@@ -4015,14 +4015,14 @@ static int inet6_fill_link_af(struct sk_buff *skb, const struct net_device *dev)
4015} 4015}
4016 4016
4017static int inet6_fill_ifinfo(struct sk_buff *skb, struct inet6_dev *idev, 4017static int inet6_fill_ifinfo(struct sk_buff *skb, struct inet6_dev *idev,
4018 u32 pid, u32 seq, int event, unsigned int flags) 4018 u32 portid, u32 seq, int event, unsigned int flags)
4019{ 4019{
4020 struct net_device *dev = idev->dev; 4020 struct net_device *dev = idev->dev;
4021 struct ifinfomsg *hdr; 4021 struct ifinfomsg *hdr;
4022 struct nlmsghdr *nlh; 4022 struct nlmsghdr *nlh;
4023 void *protoinfo; 4023 void *protoinfo;
4024 4024
4025 nlh = nlmsg_put(skb, pid, seq, event, sizeof(*hdr), flags); 4025 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*hdr), flags);
4026 if (nlh == NULL) 4026 if (nlh == NULL)
4027 return -EMSGSIZE; 4027 return -EMSGSIZE;
4028 4028
@@ -4080,7 +4080,7 @@ static int inet6_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
4080 if (!idev) 4080 if (!idev)
4081 goto cont; 4081 goto cont;
4082 if (inet6_fill_ifinfo(skb, idev, 4082 if (inet6_fill_ifinfo(skb, idev,
4083 NETLINK_CB(cb->skb).pid, 4083 NETLINK_CB(cb->skb).portid,
4084 cb->nlh->nlmsg_seq, 4084 cb->nlh->nlmsg_seq,
4085 RTM_NEWLINK, NLM_F_MULTI) <= 0) 4085 RTM_NEWLINK, NLM_F_MULTI) <= 0)
4086 goto out; 4086 goto out;
@@ -4128,14 +4128,14 @@ static inline size_t inet6_prefix_nlmsg_size(void)
4128} 4128}
4129 4129
4130static int inet6_fill_prefix(struct sk_buff *skb, struct inet6_dev *idev, 4130static int inet6_fill_prefix(struct sk_buff *skb, struct inet6_dev *idev,
4131 struct prefix_info *pinfo, u32 pid, u32 seq, 4131 struct prefix_info *pinfo, u32 portid, u32 seq,
4132 int event, unsigned int flags) 4132 int event, unsigned int flags)
4133{ 4133{
4134 struct prefixmsg *pmsg; 4134 struct prefixmsg *pmsg;
4135 struct nlmsghdr *nlh; 4135 struct nlmsghdr *nlh;
4136 struct prefix_cacheinfo ci; 4136 struct prefix_cacheinfo ci;
4137 4137
4138 nlh = nlmsg_put(skb, pid, seq, event, sizeof(*pmsg), flags); 4138 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*pmsg), flags);
4139 if (nlh == NULL) 4139 if (nlh == NULL)
4140 return -EMSGSIZE; 4140 return -EMSGSIZE;
4141 4141
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,
470static int ip6addrlbl_fill(struct sk_buff *skb, 470static 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);
589out: 589out:
590 return err; 590 return err;
591} 591}
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
2204static int ip6mr_fill_mroute(struct mr6_table *mrt, struct sk_buff *skb, 2204static 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;
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 339d921cf3b6..a81c6790a648 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1874,7 +1874,7 @@ static struct rt6_info *rt6_add_route_info(struct net *net,
1874 .fc_dst_len = prefixlen, 1874 .fc_dst_len = prefixlen,
1875 .fc_flags = RTF_GATEWAY | RTF_ADDRCONF | RTF_ROUTEINFO | 1875 .fc_flags = RTF_GATEWAY | RTF_ADDRCONF | RTF_ROUTEINFO |
1876 RTF_UP | RTF_PREF(pref), 1876 RTF_UP | RTF_PREF(pref),
1877 .fc_nlinfo.pid = 0, 1877 .fc_nlinfo.portid = 0,
1878 .fc_nlinfo.nlh = NULL, 1878 .fc_nlinfo.nlh = NULL,
1879 .fc_nlinfo.nl_net = net, 1879 .fc_nlinfo.nl_net = net,
1880 }; 1880 };
@@ -1924,7 +1924,7 @@ struct rt6_info *rt6_add_dflt_router(const struct in6_addr *gwaddr,
1924 .fc_ifindex = dev->ifindex, 1924 .fc_ifindex = dev->ifindex,
1925 .fc_flags = RTF_GATEWAY | RTF_ADDRCONF | RTF_DEFAULT | 1925 .fc_flags = RTF_GATEWAY | RTF_ADDRCONF | RTF_DEFAULT |
1926 RTF_UP | RTF_EXPIRES | RTF_PREF(pref), 1926 RTF_UP | RTF_EXPIRES | RTF_PREF(pref),
1927 .fc_nlinfo.pid = 0, 1927 .fc_nlinfo.portid = 0,
1928 .fc_nlinfo.nlh = NULL, 1928 .fc_nlinfo.nlh = NULL,
1929 .fc_nlinfo.nl_net = dev_net(dev), 1929 .fc_nlinfo.nl_net = dev_net(dev),
1930 }; 1930 };
@@ -2285,7 +2285,7 @@ static int rtm_to_fib6_config(struct sk_buff *skb, struct nlmsghdr *nlh,
2285 if (rtm->rtm_type == RTN_LOCAL) 2285 if (rtm->rtm_type == RTN_LOCAL)
2286 cfg->fc_flags |= RTF_LOCAL; 2286 cfg->fc_flags |= RTF_LOCAL;
2287 2287
2288 cfg->fc_nlinfo.pid = NETLINK_CB(skb).pid; 2288 cfg->fc_nlinfo.portid = NETLINK_CB(skb).portid;
2289 cfg->fc_nlinfo.nlh = nlh; 2289 cfg->fc_nlinfo.nlh = nlh;
2290 cfg->fc_nlinfo.nl_net = sock_net(skb->sk); 2290 cfg->fc_nlinfo.nl_net = sock_net(skb->sk);
2291 2291
@@ -2376,7 +2376,7 @@ static inline size_t rt6_nlmsg_size(void)
2376static int rt6_fill_node(struct net *net, 2376static int rt6_fill_node(struct net *net,
2377 struct sk_buff *skb, struct rt6_info *rt, 2377 struct sk_buff *skb, struct rt6_info *rt,
2378 struct in6_addr *dst, struct in6_addr *src, 2378 struct in6_addr *dst, struct in6_addr *src,
2379 int iif, int type, u32 pid, u32 seq, 2379 int iif, int type, u32 portid, u32 seq,
2380 int prefix, int nowait, unsigned int flags) 2380 int prefix, int nowait, unsigned int flags)
2381{ 2381{
2382 struct rtmsg *rtm; 2382 struct rtmsg *rtm;
@@ -2392,7 +2392,7 @@ static int rt6_fill_node(struct net *net,
2392 } 2392 }
2393 } 2393 }
2394 2394
2395 nlh = nlmsg_put(skb, pid, seq, type, sizeof(*rtm), flags); 2395 nlh = nlmsg_put(skb, portid, seq, type, sizeof(*rtm), flags);
2396 if (!nlh) 2396 if (!nlh)
2397 return -EMSGSIZE; 2397 return -EMSGSIZE;
2398 2398
@@ -2537,7 +2537,7 @@ int rt6_dump_route(struct rt6_info *rt, void *p_arg)
2537 2537
2538 return rt6_fill_node(arg->net, 2538 return rt6_fill_node(arg->net,
2539 arg->skb, rt, NULL, NULL, 0, RTM_NEWROUTE, 2539 arg->skb, rt, NULL, NULL, 0, RTM_NEWROUTE,
2540 NETLINK_CB(arg->cb->skb).pid, arg->cb->nlh->nlmsg_seq, 2540 NETLINK_CB(arg->cb->skb).portid, arg->cb->nlh->nlmsg_seq,
2541 prefix, 0, NLM_F_MULTI); 2541 prefix, 0, NLM_F_MULTI);
2542} 2542}
2543 2543
@@ -2617,14 +2617,14 @@ static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void
2617 skb_dst_set(skb, &rt->dst); 2617 skb_dst_set(skb, &rt->dst);
2618 2618
2619 err = rt6_fill_node(net, skb, rt, &fl6.daddr, &fl6.saddr, iif, 2619 err = rt6_fill_node(net, skb, rt, &fl6.daddr, &fl6.saddr, iif,
2620 RTM_NEWROUTE, NETLINK_CB(in_skb).pid, 2620 RTM_NEWROUTE, NETLINK_CB(in_skb).portid,
2621 nlh->nlmsg_seq, 0, 0, 0); 2621 nlh->nlmsg_seq, 0, 0, 0);
2622 if (err < 0) { 2622 if (err < 0) {
2623 kfree_skb(skb); 2623 kfree_skb(skb);
2624 goto errout; 2624 goto errout;
2625 } 2625 }
2626 2626
2627 err = rtnl_unicast(skb, net, NETLINK_CB(in_skb).pid); 2627 err = rtnl_unicast(skb, net, NETLINK_CB(in_skb).portid);
2628errout: 2628errout:
2629 return err; 2629 return err;
2630} 2630}
@@ -2644,14 +2644,14 @@ void inet6_rt_notify(int event, struct rt6_info *rt, struct nl_info *info)
2644 goto errout; 2644 goto errout;
2645 2645
2646 err = rt6_fill_node(net, skb, rt, NULL, NULL, 0, 2646 err = rt6_fill_node(net, skb, rt, NULL, NULL, 0,
2647 event, info->pid, seq, 0, 0, 0); 2647 event, info->portid, seq, 0, 0, 0);
2648 if (err < 0) { 2648 if (err < 0) {
2649 /* -EMSGSIZE implies BUG in rt6_nlmsg_size() */ 2649 /* -EMSGSIZE implies BUG in rt6_nlmsg_size() */
2650 WARN_ON(err == -EMSGSIZE); 2650 WARN_ON(err == -EMSGSIZE);
2651 kfree_skb(skb); 2651 kfree_skb(skb);
2652 goto errout; 2652 goto errout;
2653 } 2653 }
2654 rtnl_notify(skb, net, info->pid, RTNLGRP_IPV6_ROUTE, 2654 rtnl_notify(skb, net, info->portid, RTNLGRP_IPV6_ROUTE,
2655 info->nlh, gfp_any()); 2655 info->nlh, gfp_any());
2656 return; 2656 return;
2657errout: 2657errout: