From 5ff00b32900189063eba181c9d6c9e1620a3fc4b Mon Sep 17 00:00:00 2001 From: jow Date: Thu, 15 Dec 2011 17:16:07 +0000 Subject: [PATCH] [packages] radvd: make logging of netlink-triggered config reloads silent, remove own hotplug handler git-svn-id: svn://svn.openwrt.org/openwrt/packages@29542 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ipv6/radvd/Makefile | 4 +- ipv6/radvd/files/radvd.hotplug | 5 -- .../patches/100-silent-netlink-config-reload.patch | 67 ++++++++++++++++++++++ 3 files changed, 68 insertions(+), 8 deletions(-) delete mode 100644 ipv6/radvd/files/radvd.hotplug create mode 100644 ipv6/radvd/patches/100-silent-netlink-config-reload.patch diff --git a/ipv6/radvd/Makefile b/ipv6/radvd/Makefile index bdd0a585c..01b1b6d90 100644 --- a/ipv6/radvd/Makefile +++ b/ipv6/radvd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=radvd PKG_VERSION:=1.8.3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://v6web.litech.org/radvd/dist \ @@ -66,8 +66,6 @@ define Package/radvd/install $(INSTALL_CONF) ./files/radvd.config $(1)/etc/config/radvd $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/radvd.init $(1)/etc/init.d/radvd - $(INSTALL_DIR) $(1)/etc/hotplug.d/iface - $(INSTALL_DATA) ./files/radvd.hotplug $(1)/etc/hotplug.d/iface/05-radvd $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radvd $(1)/usr/sbin/ endef diff --git a/ipv6/radvd/files/radvd.hotplug b/ipv6/radvd/files/radvd.hotplug deleted file mode 100644 index 10a7ca8f6..000000000 --- a/ipv6/radvd/files/radvd.hotplug +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -if [ "$ACTION" = ifup ]; then - killall -HUP radvd 2>/dev/null -fi diff --git a/ipv6/radvd/patches/100-silent-netlink-config-reload.patch b/ipv6/radvd/patches/100-silent-netlink-config-reload.patch new file mode 100644 index 000000000..3439a25da --- /dev/null +++ b/ipv6/radvd/patches/100-silent-netlink-config-reload.patch @@ -0,0 +1,67 @@ +--- a/netlink.c ++++ b/netlink.c +@@ -65,7 +65,7 @@ void process_netlink_msg(int sock) + else { + dlog(LOG_DEBUG, 3, "%s, ifindex %d, flags is *NOT* running", ifname, ifinfo->ifi_index); + } +- reload_config(); ++ reload_config(LOG_DEBUG); + } + } + +--- a/radvd.c ++++ b/radvd.c +@@ -443,7 +443,7 @@ void main_loop(void) + + if (sighup_received) + { +- reload_config(); ++ reload_config(LOG_INFO); + sighup_received = 0; + } + +@@ -551,11 +551,11 @@ stop_adverts(void) + } + } + +-void reload_config(void) ++void reload_config(int loglevel) + { + struct Interface *iface; + +- flog(LOG_INFO, "attempting to reread config file"); ++ flog(loglevel, "attempting to reread config file"); + + dlog(LOG_DEBUG, 4, "reopening log"); + if (log_reopen() < 0) { +@@ -631,7 +631,7 @@ void reload_config(void) + config_interface(); + kickoff_adverts(); + +- flog(LOG_INFO, "resuming normal operation"); ++ flog(loglevel, "resuming normal operation"); + } + + void +--- a/radvd.h ++++ b/radvd.h +@@ -186,7 +186,7 @@ int yylex(void); + + /* radvd.c */ + int check_ip6_forwarding(void); +-void reload_config(void); ++void reload_config(int); + void reset_prefix_lifetimes(void); + + /* timer.c */ +--- a/send.c ++++ b/send.c +@@ -154,7 +154,7 @@ send_ra(struct Interface *iface, struct + * reload_config() will kick off new timers anyway. This avoids + * timer list corruption. + */ +- reload_config(); ++ reload_config(LOG_INFO); + return -1; + } + } -- 2.11.0