[NETLINK]: Set correct pid for ioctl originating netlink events
This patch ensures that netlink events created as a result of programns using ioctls (such as ifconfig, route etc) contains the correct PID of those events. Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
e431b8c004
commit
9ed19f339e
@@ -1112,7 +1112,7 @@ static void rtmsg_ifa(int event, struct in_ifaddr* ifa)
|
||||
|
||||
if (!skb)
|
||||
netlink_set_err(rtnl, 0, RTMGRP_IPV4_IFADDR, ENOBUFS);
|
||||
else if (inet_fill_ifaddr(skb, ifa, 0, 0, event, 0) < 0) {
|
||||
else if (inet_fill_ifaddr(skb, ifa, current->pid, 0, event, 0) < 0) {
|
||||
kfree_skb(skb);
|
||||
netlink_set_err(rtnl, 0, RTMGRP_IPV4_IFADDR, EINVAL);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user