mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
net-snmp: fix inbound firewall rule support
Commit ae5ee6ba6c added support for inbound
firewall rule support but some corner cases were not covered.
In case net-snmp is started and the network interface is already up
the procd firewall rule is created but not applied by fw3 as
service_started calling procd_set_config_changed firewall was missing.
When stopping net-snmp clean up the net-snmp inbound firewall rules in
iptables by calling procd_set_config_changed firewall in stop_service
which will trigger fw3 to remove the inbound firewall rules.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
This commit is contained in:
@@ -325,6 +325,7 @@ start_service() {
|
||||
|
||||
stop_service() {
|
||||
[ -f "$CONFIGFILE" ] && rm -f "$CONFIGFILE"
|
||||
procd_set_config_changed firewall
|
||||
}
|
||||
|
||||
service_triggers(){
|
||||
@@ -337,3 +338,7 @@ service_triggers(){
|
||||
|
||||
procd_add_reload_trigger 'snmpd'
|
||||
}
|
||||
|
||||
service_started() {
|
||||
procd_set_config_changed firewall
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user