Re: [PATCH] illegal use of pid in rtnetlink

2006-02-09 Thread Alexey Kuznetsov
Hello! > _I_ use it although i am not aware of anyone else (but since you put it > in libnetlink, i suspect there may be other people No, really. It just was easy, but there were no specific applications. It is important for listener to be able to subscribe to many groups, but sending is apparent

Re: [PATCH] illegal use of pid in rtnetlink

2006-02-09 Thread jamal
On Thu, 2006-09-02 at 15:18 +0200, Hasso Tepper wrote: > jamal wrote: > > > It is sad, that dead nl_groups stays in struct sockaddr_nl, of > > > course. > > > > Its value has been highly reduced for sure. > > Let me know your thoughts on the xcast idea. > > All routing protocols suite implementati

Re: [PATCH] illegal use of pid in rtnetlink

2006-02-09 Thread Hasso Tepper
jamal wrote: > > It is sad, that dead nl_groups stays in struct sockaddr_nl, of > > course. > > Its value has been highly reduced for sure. > Let me know your thoughts on the xcast idea. All routing protocols suite implementations use it to select rtnetlink multicast groups they want to listen in

Re: [PATCH] illegal use of pid in rtnetlink

2006-02-09 Thread jamal
On Thu, 2006-09-02 at 13:08 +0300, Alexey Kuznetsov wrote: > Hello! > > > I am not aware of anyone using it > > So, do not worry. The feature is dead. I misunderstood your question. I thought you were asking about the > 32 groups. > Sending to multiple groups > never was used in real life and

Re: [PATCH] illegal use of pid in rtnetlink

2006-02-09 Thread Alexey Kuznetsov
Hello! > I am not aware of anyone using it So, do not worry. The feature is dead. Sending to multiple groups never was used in real life and now it just does not exist, as it should happen with useless features. It is sad, that dead nl_groups stays in struct sockaddr_nl, of course. Alexey - To

Re: [PATCH] illegal use of pid in rtnetlink

2006-02-08 Thread jamal
On Thu, 2006-09-02 at 03:40 +0300, Alexey Kuznetsov wrote: > Hello! > > > BTW, Alexey - if you have a chance can you look at the breakage of > > sendmsg() in relation to multicast that exists today? > > If it is is about groups > 31, which cannot be mapped to nl_groups, > it is possible just to a

Re: [PATCH] illegal use of pid in rtnetlink

2006-02-08 Thread David S. Miller
From: jamal <[EMAIL PROTECTED]> Date: Wed, 08 Feb 2006 19:07:25 -0500 > On Thu, 2006-09-02 at 01:46 +0300, Alexey Kuznetsov wrote: > > Hello! > > > > > What about the dilemma of when there are no netlink sockets > > > involved? ;-> > > > i.e what is the semantics when there is no netlink socket

Re: [PATCH] illegal use of pid in rtnetlink

2006-02-08 Thread Alexey Kuznetsov
Hello! > BTW, Alexey - if you have a chance can you look at the breakage of > sendmsg() in relation to multicast that exists today? If it is is about groups > 31, which cannot be mapped to nl_groups, it is possible just to add setsockopt(), setting dst_group. It is just to complete the API. Do s

Re: [PATCH] illegal use of pid in rtnetlink

2006-02-08 Thread jamal
On Thu, 2006-09-02 at 01:46 +0300, Alexey Kuznetsov wrote: > Hello! > > > What about the dilemma of when there are no netlink sockets > > involved? ;-> > > i.e what is the semantics when there is no netlink socket to map them > > to, such as in the case of ioctl? > > 0, which is legal address of

Re: [PATCH] illegal use of pid in rtnetlink

2006-02-08 Thread Hasso Tepper
jamal wrote: > a) if user-app using netlink modifies something, the event will report > the nl_pid mapped to its pid or other non-zero value depending on > the number of netlink sockets mapped to that process/user-app It will always be nl_pid of the socket. And don't forget that this pid and nega

Re: [PATCH] illegal use of pid in rtnetlink

2006-02-08 Thread Alexey Kuznetsov
Hello! > What about the dilemma of when there are no netlink sockets > involved? ;-> > i.e what is the semantics when there is no netlink socket to map them > to, such as in the case of ioctl? 0, which is legal address of kernel socket. In this case it means that "kernel" did the operation. Mor

Re: [PATCH] illegal use of pid in rtnetlink

2006-02-08 Thread Hasso Tepper
jamal wrote: > So the question is what would be the "address"/nl_pid of something > issued by an ioctl (refer to my earlier email to Alexey). It's the kernel who creates this message and puts it to the netlink domain, so I'd say 0. -- Hasso Tepper - To unsubscribe from this list: send the line

Re: [PATCH] illegal use of pid in rtnetlink

2006-02-08 Thread jamal
On Wed, 2006-08-02 at 23:41 +0200, Hasso Tepper wrote: > jamal wrote: > > At the moment if a route (v6 or v4) was added by quagga and i had a > > socket that was listening in a different process - what pid will i see > > (in my user space app)? Is it of the quagga process or is it 0? > > No, it's

Re: [PATCH] illegal use of pid in rtnetlink

2006-02-08 Thread Hasso Tepper
jamal wrote: > On Wed, 2006-08-02 at 22:50 +0200, Hasso Tepper wrote: > > jamal wrote: > > > Ok, thanks for the reminder Hasso. > > > so essentially at the moment the pid that will show up (if > > > quagga added the v6 route) will be that of quagga, correct? > > > > No. Quote from Alexey: > > I sen

Re: [PATCH] illegal use of pid in rtnetlink

2006-02-08 Thread jamal
On Thu, 2006-09-02 at 00:02 +0300, Alexey Kuznetsov wrote: > I am afraid It is not logical and inconsistent and really breaks > netlink. :-) > > Those nl_pid's are _addresses_ of netlink sockets. You cannot fill them > with random numbers. > Ok, Alexey: What about the dilemma of when there are

Re: [PATCH] illegal use of pid in rtnetlink

2006-02-08 Thread jamal
On Wed, 2006-08-02 at 22:50 +0200, Hasso Tepper wrote: > jamal wrote: > > Ok, thanks for the reminder Hasso. > > so essentially at the moment the pid that will show up (if > > quagga added the v6 route) will be that of quagga, correct? > > No. Quote from Alexey: > I sense you missed my question.

Re: [PATCH] illegal use of pid in rtnetlink

2006-02-08 Thread Alexey Kuznetsov
Hello! > Ok, thanks for the reminder Hasso. > so essentially at the moment the pid that will show up (if > quagga added the v6 route) will be that of quagga, correct? In the part, where v6 routes added via netlink it was a long expected thing.. I was lazy in many places to pass identity of author

Re: [PATCH] illegal use of pid in rtnetlink

2006-02-08 Thread Hasso Tepper
jamal wrote: > Ok, thanks for the reminder Hasso. > so essentially at the moment the pid that will show up (if > quagga added the v6 route) will be that of quagga, correct? No. Quote from Alexey: "Netlink "pid" has nothing to do with current->pid. I called it incorrectly, if it was named "port",

Re: [PATCH] illegal use of pid in rtnetlink

2006-02-08 Thread jamal
Ok, thanks for the reminder Hasso. so essentially at the moment the pid that will show up (if quagga added the v6 route) will be that of quagga, correct? Same with v4 iirc? If yes, then isnt it logical that if ifconfig added an ip address it should naturally be ifconfig's pid that shows up (for co

Re: [PATCH] illegal use of pid in rtnetlink

2006-02-08 Thread Hasso Tepper
Hasso Tepper wrote: > No, that was different issue and isn't related with issue Alexey > poiting to. The issue I complained and you fixed it, Jamal, was that > IPv6 related netlink messages had always pid 0 even if they were issued > by application. It was unclear, so I have to correct myself - ".

Re: [PATCH] illegal use of pid in rtnetlink

2006-02-08 Thread Hasso Tepper
jamal wrote: > On Wed, 2006-08-02 at 18:27 +0300, Alexey Kuznetsov wrote: > > When a netlink message is not related to a netlink socket, > > it is issued by kernel socket with pid 0. Netlink "pid" has nothing > > to do with current->pid. I called it incorrectly, if it was named > > "port", the conf

Re: [PATCH] illegal use of pid in rtnetlink

2006-02-08 Thread jamal
Hi Alexey, On Wed, 2006-08-02 at 18:27 +0300, Alexey Kuznetsov wrote: > Hello! > > When a netlink message is not related to a netlink socket, > it is issued by kernel socket with pid 0. Netlink "pid" has nothing > to do with current->pid. I called it incorrectly, if it was named "port", > the con

[PATCH] illegal use of pid in rtnetlink

2006-02-08 Thread Alexey Kuznetsov
Hello! When a netlink message is not related to a netlink socket, it is issued by kernel socket with pid 0. Netlink "pid" has nothing to do with current->pid. I called it incorrectly, if it was named "port", the confusion would be avoided. Jamal, please, review. Did you have reasons to do this?