<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 25, 2016, at 4:43, Lennart Poettering <<a href="mailto:lennart@poettering.net" class="">lennart@poettering.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On Sat, 23.01.16 14:22, Johannes Ernst (<a href="mailto:johannes.ernst@gmail.com" class="">johannes.ernst@gmail.com</a>) wrote:<br class=""><br class=""><blockquote type="cite" class="">Is there a way to receive a callback when a dhcp client-side IP address changes?<br class=""><br class="">Use case: dynamic DNS update.<br class=""></blockquote><br class="">On Linux changes regarding IP configuration are reported via rtnl (aka<br class="">routing netlink). This works regardless how the IP address was<br class="">required, and without any extra API from networkd.<br class=""></div></div></blockquote><br class=""></div><div>So the way to do this would be to write a little daemon that listens to these events [1]</div><div><br class=""></div><div><div class="paragraph"><div class="title"></div></div><blockquote type="cite" class=""><div class="paragraph"><div class="title">RTM_NEWLINK (kernel→user)</div><p class="">This message type is used in reply to a <code class="">RTM_GETLINK</code> 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.</p></div>

<div class="paragraph"><p class="">The message type is also used for notifications sent by the kernel to the

multicast group <code class="">RTNLGRP_LINK</code> 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.</p></div></blockquote><div class="paragraph"><div class="">and exec’s something in response? I agree it’s strange nobody has done that yet, apparently.</div><div class=""><br class=""></div></div></div><div>Cheers,</div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div>Johannes.</div><div><br class=""></div><div><br class=""></div><div>[1] <a href="https://www.infradead.org/~tgr/libnl/doc/route.html" class="">https://www.infradead.org/~tgr/libnl/doc/route.html</a></div><br class=""></body></html>