Ensure subnet-up/down scripts are called after HUP when necessary.
authorGuus Sliepen <guus@tinc-vpn.org>
Sun, 11 Apr 2010 16:34:50 +0000 (18:34 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Sun, 11 Apr 2010 16:34:50 +0000 (18:34 +0200)
src/net.c

index db8eae7..a04ba00 100644 (file)
--- 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);
                                        }
                                }
                        }