netdev
[Top] [All Lists]

Re: PATCH: ioctl send PID in netlink events

To: jamal <hadi@xxxxxxxxxx>
Subject: Re: PATCH: ioctl send PID in netlink events
From: Thomas Graf <tgraf@xxxxxxx>
Date: Fri, 3 Jun 2005 03:00:59 +0200
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>, netdev <netdev@xxxxxxxxxxx>
In-reply-to: <1117720349.6050.59.camel@xxxxxxxxxxxxxxxxxxxxx>
References: <1117720349.6050.59.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
> Index: net/ipv4/devinet.c
> ===================================================================
> --- e4f7366a04d973a42a948d3b4175d66e9adf143e/net/ipv4/devinet.c  (mode:100644)
> +++ uncommitted/net/ipv4/devinet.c  (mode:100644)
> @@ -236,6 +236,7 @@
>       struct in_ifaddr *promote = NULL;
>       struct in_ifaddr *ifa1 = *ifap;
>  
> +     printk("inet_del_ifa: pid %d\n",current->pid);
>       ASSERT_RTNL();
>  
>       /* 1. Deleting primary ifaddr forces deletion all secondaries 
> @@ -305,6 +306,7 @@
>  
>       ASSERT_RTNL();
>  
> +     printk("inet_insert_ifa: pid %d\n",current->pid);
>       if (!ifa->ifa_local) {
>               inet_free_ifa(ifa);
>               return 0;

Don't you want to remove these?


> Index: net/ipv4/fib_semantics.c
> ===================================================================
> --- e4f7366a04d973a42a948d3b4175d66e9adf143e/net/ipv4/fib_semantics.c  
> (mode:100644)
> +++ uncommitted/net/ipv4/fib_semantics.c  (mode:100644)
> @@ -276,7 +276,7 @@
>              struct nlmsghdr *n, struct netlink_skb_parms *req)
>  {
>       struct sk_buff *skb;
> -     u32 pid = req ? req->pid : 0;
> +     u32 pid = req ? req->pid : n->nlmsg_pid;
>       int size = NLMSG_SPACE(sizeof(struct rtmsg)+256);
>  
>       skb = alloc_skb(size, GFP_KERNEL);
> @@ -1035,7 +1035,7 @@
>       }
>  
>       nl->nlmsg_flags = NLM_F_REQUEST;
> -     nl->nlmsg_pid = 0;
> +     nl->nlmsg_pid = current->pid;
>       nl->nlmsg_seq = 0;
>       nl->nlmsg_len = NLMSG_LENGTH(sizeof(*rtm));
>       if (cmd == SIOCDELRT) {

Neat ;->

<Prev in Thread] Current Thread [Next in Thread>