> On Jan 25, 2016, at 4:43, Lennart Poettering <[email protected]> wrote:
> 
> On Sat, 23.01.16 14:22, Johannes Ernst ([email protected]) wrote:
> 
>> Is there a way to receive a callback when a dhcp client-side IP address 
>> changes?
>> 
>> Use case: dynamic DNS update.
> 
> On Linux changes regarding IP configuration are reported via rtnl (aka
> routing netlink). This works regardless how the IP address was
> required, and without any extra API from networkd.

So the way to do this would be to write a little daemon that listens to these 
events [1]

> RTM_NEWLINK (kernel→user)
> This message type is used in reply to a RTM_GETLINK request and carries the 
> configuration and statistics of a link. If multiple links need to be sent, 
> the messages will be sent in form of a multipart message.
> 
> The message type is also used for notifications sent by the kernel to the 
> multicast group RTNLGRP_LINK to inform about various link events. It is 
> therefore recommended to always use a separate link socket for link 
> notifications in order to separate between the two message types.
> 
and exec’s something in response? I agree it’s strange nobody has done that 
yet, apparently.

Cheers,



Johannes.


[1] https://www.infradead.org/~tgr/libnl/doc/route.html

_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to