tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Adding ifam_pid to ifa_msghdr

In article <>,
Roy Marples  <> wrote:
>On 31/08/2016 07:02, Christos Zoulas wrote:
>> In article <>,
>> Roy Marples  <> wrote:
>>> Hi List!
>>> Unlike rtm_msghdr, ifam_msghdr has no idea of the identity of the
>process who 
>>> added or deleted an address.
>>> This is important for processes which add/delete addresses while
>listening for 
>>> 3rd parties to add/delete addresses as well, so self generated
>messages can be 
>>> ignored.
>>> Here is a simple patch which adds ifam_pid to ifa_msghdr so the identity of 
>>> the sender is known.
>>> Unless anyone objects, I will add this soon.
>> If only it was that simple... See sys/compat/net/if.h how to do it properly.
>OK, I have a new patch for this here:
>I took the liberty of adding ifam_addrflags while here, so that it can
>be added to getifaddrs(3) and both save an extra ioctl per address for
>programs like dhcpcd, which also decreases it's binary size.
>Comments welcome.

You need to version getifaddrs(3).


Home | Main Index | Thread Index | Old Index