]> git.meshlink.io Git - meshlink/commitdiff
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 db8eae76e6cfab12d36fced9c28d43ad099b19de..a04ba005b67fc616e8291a4f80dddb9ff9c50af8 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);
                                        }
                                }
                        }