diff options
author | Alin Năstac <alin.nastac@gmail.com> | 2017-02-27 10:08:34 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2017-03-05 16:38:41 +0100 |
commit | 8f218f5626a3cb3900dbe9801ee8ace236b0e4a5 (patch) | |
tree | 86b41c2c6d4e48d1a9fb2e245e06394c538ec5f0 /service/service.h | |
parent | 35209a01f2df708546d5aecca05cdcf11c0e7332 (diff) | |
download | procd-8f218f5626a3cb3900dbe9801ee8ace236b0e4a5.tar.gz |
procd: service gets deleted when its last instance is freed
This fixes the following regression introduced in commit
961dc692aff7457f874bce61f8e766514edcf794:
1) reboot using the following configuration
root@OpenWrt:~# uci show system.ntp
system.ntp=timeserver
system.ntp.enable_server='0'
system.ntp.use_dhcp='1'
system.ntp.dhcp_interface='wan'
root@OpenWrt:~# uci show network.wan
network.wan=interface
network.wan.proto='dhcp'
network.wan.ifname='eth4'
network.wan.reqopts='1 3 6 15 33 42 51 121 249'
2) if obtained DHCP lease has an option 42 sysntpd service will have an
instance
3) run "ifup wan"
4) although the same DHCP lease was obtained, sysntpd would be stopped
Because sysntpd service is deleted when last instance is freed, its triggers
will also be released. Without these triggers in place, sysntpd will not be
reloaded when a new DHCP lease containing option 42 will be received.
Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
Diffstat (limited to 'service/service.h')
-rw-r--r-- | service/service.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/service/service.h b/service/service.h index d4f0a83..cc629b1 100644 --- a/service/service.h +++ b/service/service.h @@ -40,6 +40,7 @@ struct validate { struct service { struct avl_node avl; const char *name; + bool deleted; struct blob_attr *trigger; struct vlist_tree instances; |