[PATCH] host-up and host-down hooks
Menno Smits
menno at netboxblue.com
Mon Jun 12 17:15:29 CEST 2006
Guus Sliepen wrote:
> On Mon, Jun 12, 2006 at 02:42:47PM +0100, Menno Smits wrote:
>
>> Here's a dead simple patch that causes tinc to run optional host-up and
>> host-down scripts as hosts come up and go down. This allows custom host
>> up/down functionality to run without having to know host names in
>> advance. Please consider for future inclusion in tinc. I can provide
>> documentation patches if this is accepted.
>
> Thanks! But, there are already subnet-up and subnet-down hooks, which
> allow you to do the same (and more) than with host-up and host-down
> hooks. Is there a situation where host-up/down is better than
> subnet-up/down?
We have been using the subnet-up and subnet-down hooks to run scripts
which update a stored representation of the current VPN state. This
stored representation is used to drive a real-time web display of the
VPN showing which sites are up and what subnets are attached to each.
This approach has one problem because we also want to show the hosts on
the VPN display even if they have no subnets configured. If we rely on
just the subnet-up script then the stored representation will see the
host even though it is actually connected to the VPN. By using both
subnet-up/down and host-up/down we get the desired information.
Hope that makes sense.
Regards,
Menno
Scanned by the NetBox from NetBox Blue
(http://netboxblue.com/)
More information about the tinc-devel
mailing list