radvd: make logging of netlink-triggered config reloads silent, remove own hotplug...
[openwrt/svn-archive/packages.git] / ipv6 / radvd / patches / 100-silent-netlink-config-reload.patch
1 --- a/netlink.c
2 +++ b/netlink.c
3 @@ -65,7 +65,7 @@ void process_netlink_msg(int sock)
4 else {
5 dlog(LOG_DEBUG, 3, "%s, ifindex %d, flags is *NOT* running", ifname, ifinfo->ifi_index);
6 }
7 - reload_config();
8 + reload_config(LOG_DEBUG);
9 }
10 }
11
12 --- a/radvd.c
13 +++ b/radvd.c
14 @@ -443,7 +443,7 @@ void main_loop(void)
15
16 if (sighup_received)
17 {
18 - reload_config();
19 + reload_config(LOG_INFO);
20 sighup_received = 0;
21 }
22
23 @@ -551,11 +551,11 @@ stop_adverts(void)
24 }
25 }
26
27 -void reload_config(void)
28 +void reload_config(int loglevel)
29 {
30 struct Interface *iface;
31
32 - flog(LOG_INFO, "attempting to reread config file");
33 + flog(loglevel, "attempting to reread config file");
34
35 dlog(LOG_DEBUG, 4, "reopening log");
36 if (log_reopen() < 0) {
37 @@ -631,7 +631,7 @@ void reload_config(void)
38 config_interface();
39 kickoff_adverts();
40
41 - flog(LOG_INFO, "resuming normal operation");
42 + flog(loglevel, "resuming normal operation");
43 }
44
45 void
46 --- a/radvd.h
47 +++ b/radvd.h
48 @@ -186,7 +186,7 @@ int yylex(void);
49
50 /* radvd.c */
51 int check_ip6_forwarding(void);
52 -void reload_config(void);
53 +void reload_config(int);
54 void reset_prefix_lifetimes(void);
55
56 /* timer.c */
57 --- a/send.c
58 +++ b/send.c
59 @@ -154,7 +154,7 @@ send_ra(struct Interface *iface, struct
60 * reload_config() will kick off new timers anyway. This avoids
61 * timer list corruption.
62 */
63 - reload_config();
64 + reload_config(LOG_INFO);
65 return -1;
66 }
67 }