From: Guus Sliepen Date: Sun, 11 Apr 2010 16:34:50 +0000 (+0200) Subject: Ensure subnet-up/down scripts are called after HUP when necessary. X-Git-Tag: import-tinc-1.1~550^2~5 X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=4708f2c89edea4be2562256544cf35309cf1ea89;p=meshlink Ensure subnet-up/down scripts are called after HUP when necessary. --- diff --git a/src/net.c b/src/net.c index db8eae76..a04ba005 100644 --- a/src/net.c +++ b/src/net.c @@ -506,11 +506,15 @@ int main_loop(void) { subnet = node->data; if(subnet->expires == 1) { send_del_subnet(broadcast, subnet); + if(subnet->owner->status.reachable) + subnet_update(subnet->owner, subnet, false); subnet_del(subnet->owner, subnet); } else if(subnet->expires == -1) { subnet->expires = 0; } else { send_add_subnet(broadcast, subnet); + if(subnet->owner->status.reachable) + subnet_update(subnet->owner, subnet, true); } } }