From 0bd19db0498780c3ac1e69ebc16c1334a609e285 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Mon, 6 Nov 2017 11:39:14 +0100 Subject: [PATCH 1/2] 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 --- 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 0237a54da..fbe6df8b2 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 caffecf66..2b60fe05d 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 +} From 8d446e8da68b92d6fb03fde362e44f64ea403671 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Mon, 6 Nov 2017 14:38:26 +0100 Subject: [PATCH 2/2] net-snmp: InstallDev fix Commit 384c2a8cfd2af9bc7acd6a642d71dbac2cc5056f added support for symlinking net-snmp-config into $(STAGING_DIR)/usr/bin but forgot to install first $(STAGING_DIR)/usr/bin resulting into a compile issue if $(STAGING_DIR)/usr/bin is not yet present. Signed-off-by: Hans Dedecker --- net/net-snmp/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/net/net-snmp/Makefile b/net/net-snmp/Makefile index fbe6df8b2..ecb4efa12 100644 --- a/net/net-snmp/Makefile +++ b/net/net-snmp/Makefile @@ -228,6 +228,7 @@ define Build/InstallDev $(INSTALL_DIR) $(2)/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/net-snmp-config $(2)/bin/ $(SED) 's,=/usr,=$(STAGING_DIR)/usr,g' $(2)/bin/net-snmp-config + $(INSTALL_DIR) $(STAGING_DIR)/usr/bin $(LN) $(STAGING_DIR)/host/bin/net-snmp-config $(STAGING_DIR)/usr/bin/ $(INSTALL_DIR) $(1)/usr/include