inetd: Flush existing filters on reload

Flush any existing filter rules when a configuration file is
updated. Otherwise filters are simply appended to the old
configuration which can cause finit to accept connections on
interfaces that are blocked in the new configuration.
This commit is contained in:
Tobias Waldekranz committed 2016-02-19 12:53:39 +01:00
1 parent c41016ef32
commit 2555fe8e96
3 files changed
+15

No files matched your search

+2
View File
@@ -671,6 +671,8 @@ int service_register(int type, char *line, time_t mtime, char *username)
}
inetd_setup:
inetd_flush(&svc->inetd);
if (!ifaces) {
_d("No specific iface listed for %s, allowing ANY.", service);
inetd_allow(&svc->inetd, NULL);