From 474d9a0a1503493cf33db98051a0aa29ef8478c5 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Mon, 6 Nov 2017 11:39:14 +0100 Subject: [PATCH] net-snmp: fix inbound firewall rule support Commit ae5ee6ba6c506b42d942c98349b3a54181790ec8 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 (cherry picked from commit 0bd19db0498780c3ac1e69ebc16c1334a609e285) --- net/net-snmp/Makefile | 2 +- net/net-snmp/files/snmpd.init | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/net/net-snmp/Makefile b/net/net-snmp/Makefile index d3dda58f19..ecb4efa123 100644 --- a/net/net-snmp/Makefile +++ b/net/net-snmp/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=net-snmp PKG_VERSION:=5.7.3 -PKG_RELEASE:=9 +PKG_RELEASE:=10 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/net-snmp diff --git a/net/net-snmp/files/snmpd.init b/net/net-snmp/files/snmpd.init index caffecf664..2b60fe05df 100644 --- a/net/net-snmp/files/snmpd.init +++ b/net/net-snmp/files/snmpd.init @@ -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 +}