Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jun 2021 13:00:23 +0200
From:      Crest <crest@rlwinm.de>
To:        freebsd-hackers@freebsd.org
Subject:   Re: How to run script on network address change?
Message-ID:  <a02672ec-ccfc-1cab-c35b-b24787cae72c@rlwinm.de>
In-Reply-To: <20210620193744.39eae64f@rimwks.local>
References:  <20210620165215.0f3dd15c@rimwks.local> <CAJQ5JngsD4VTkoPQW4xE%2BfLOAA4L-JBeYcHeaFSs4LNzQNL6Ag@mail.gmail.com> <20210620193744.39eae64f@rimwks.local>

next in thread | previous in thread | raw e-mail | index | archive | help
On 20.06.21 18:37, Rozhuk Ivan wrote:
> On Sun, 20 Jun 2021 16:23:38 +0200
> "dmilith ." <dmilith@gmail.com> wrote:
>
>> Have you tried `route monitor`?
>   
> No, and I do not want keep running some daemon that will parse output.
>
> But thanks, I found good place to add devctl_notify() calls.
> Now devd have new events.
>
>
> run:
> ifconfig lan0 alias 192.168.1.1/24
> ifconfig lan0 -alias 192.168.1.1
> ifconfig lan0 inet6 1111::
>
> devd output:
> !system=IFNET subsystem=lan0 type=ADDR_ADD 192.168.1.1
> !system=IFNET subsystem=lan0 type=ADDR_DEL 192.168.1.1
> !system=IFNET subsystem=lan0 type=ADDR_ADD 1111::
>
>
> And even for netif rename:
> ifconfig lan0 name lan1
> ifconfig lan1 name lan0
>
> devd output:
> !system=IFNET subsystem=lan0 type=RENAME lan1
> !system=IFNET subsystem=lan1 type=RENAME lan0
Those events would be *very* useful to me although it's probably a good 
idea to add a sysctl to disable their generation on systems with very 
high address churn.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a02672ec-ccfc-1cab-c35b-b24787cae72c>