summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2018-11-29 13:11:05 -0200
committerRenato Westphal <renato@opensourcerouting.org>2018-12-03 13:47:58 -0200
commitb87413387024dec9149e4922cb134b898a5dd426 (patch)
treed774df15dcfa0c968293f46780ff46fa2ca27276
parentd406db4c87e9347df9e3b105b634159243374d58 (diff)
ripngd: fix SIGHUP handling
Now that all ripngd commands were converted to the new northbound model, the ripngd SIGHUP handler is capable of doing a full configuration reload just by calling the vty_read_config() function. Nothing else should be done in the SIGHUP handler. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
-rw-r--r--ripngd/ripng_debug.c7
-rw-r--r--ripngd/ripng_debug.h1
-rw-r--r--ripngd/ripng_interface.c31
-rw-r--r--ripngd/ripng_main.c4
-rw-r--r--ripngd/ripng_routemap.c6
-rw-r--r--ripngd/ripng_zebra.c5
-rw-r--r--ripngd/ripngd.c19
-rw-r--r--ripngd/ripngd.h4
8 files changed, 0 insertions, 77 deletions
diff --git a/ripngd/ripng_debug.c b/ripngd/ripng_debug.c
index c8cad23add..c56ff12627 100644
--- a/ripngd/ripng_debug.c
+++ b/ripngd/ripng_debug.c
@@ -207,13 +207,6 @@ static int config_write_debug(struct vty *vty)
return write;
}
-void ripng_debug_reset()
-{
- ripng_debug_event = 0;
- ripng_debug_packet = 0;
- ripng_debug_zebra = 0;
-}
-
void ripng_debug_init()
{
ripng_debug_event = 0;
diff --git a/ripngd/ripng_debug.h b/ripngd/ripng_debug.h
index 8124a1a0c9..81cb0f9c7e 100644
--- a/ripngd/ripng_debug.h
+++ b/ripngd/ripng_debug.h
@@ -45,6 +45,5 @@ extern unsigned long ripng_debug_packet;
extern unsigned long ripng_debug_zebra;
extern void ripng_debug_init(void);
-extern void ripng_debug_reset(void);
#endif /* _ZEBRA_RIPNG_DEBUG_H */
diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c
index d349b3e094..4d14fbab64 100644
--- a/ripngd/ripng_interface.c
+++ b/ripngd/ripng_interface.c
@@ -324,37 +324,6 @@ void ripng_interface_clean(void)
}
}
-void ripng_interface_reset(void)
-{
- struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT);
- struct interface *ifp;
- struct ripng_interface *ri;
-
- FOR_ALL_INTERFACES (vrf, ifp) {
- ri = ifp->info;
-
- ri->enable_network = 0;
- ri->enable_interface = 0;
- ri->running = 0;
-
- ri->split_horizon =
- yang_get_default_enum("%s/split-horizon", RIPNG_IFACE);
-
- ri->list[RIPNG_FILTER_IN] = NULL;
- ri->list[RIPNG_FILTER_OUT] = NULL;
-
- ri->prefix[RIPNG_FILTER_IN] = NULL;
- ri->prefix[RIPNG_FILTER_OUT] = NULL;
-
- if (ri->t_wakeup) {
- thread_cancel(ri->t_wakeup);
- ri->t_wakeup = NULL;
- }
-
- ri->passive = 0;
- }
-}
-
static void ripng_apply_address_add(struct connected *ifc)
{
struct prefix_ipv6 address;
diff --git a/ripngd/ripng_main.c b/ripngd/ripng_main.c
index 11d1266706..10e19efe77 100644
--- a/ripngd/ripng_main.c
+++ b/ripngd/ripng_main.c
@@ -72,13 +72,9 @@ static struct frr_daemon_info ripngd_di;
static void sighup(void)
{
zlog_info("SIGHUP received");
- ripng_clean();
- ripng_reset();
/* Reload config file. */
vty_read_config(NULL, ripngd_di.config_file, config_default);
-
- /* Try to return to normal operation. */
}
/* SIGINT handler. */
diff --git a/ripngd/ripng_routemap.c b/ripngd/ripng_routemap.c
index a18332516e..9a9e346a59 100644
--- a/ripngd/ripng_routemap.c
+++ b/ripngd/ripng_routemap.c
@@ -337,12 +337,6 @@ static struct route_map_rule_cmd route_set_tag_cmd = {
#define MATCH_STR "Match values from routing table\n"
#define SET_STR "Set values in destination routing protocol\n"
-void ripng_route_map_reset()
-{
- /* XXX ??? */
- ;
-}
-
void ripng_route_map_init()
{
route_map_init();
diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c
index 063b53cdab..e3f42edf51 100644
--- a/ripngd/ripng_zebra.c
+++ b/ripngd/ripng_zebra.c
@@ -141,11 +141,6 @@ static int ripng_zebra_read_route(int command, struct zclient *zclient,
return 0;
}
-void ripng_zclient_reset(void)
-{
- zclient_reset(zclient);
-}
-
void ripng_redistribute_conf_update(int type)
{
zclient_redistribute(ZEBRA_REDISTRIBUTE_ADD, zclient, AFI_IP6, type, 0,
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index 3cdf5b03e3..1ac6a4d6b9 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -2505,25 +2505,6 @@ void ripng_clean()
ripng_redistribute_clean();
}
-/* Reset all values to the default settings. */
-void ripng_reset()
-{
- /* Call ripd related reset functions. */
- ripng_debug_reset();
- ripng_route_map_reset();
-
- /* Call library reset functions. */
- vty_reset();
- access_list_reset();
- prefix_list_reset();
-
- distribute_list_reset();
-
- ripng_interface_reset();
-
- ripng_zclient_reset();
-}
-
static void ripng_if_rmap_update(struct if_rmap *if_rmap)
{
struct interface *ifp;
diff --git a/ripngd/ripngd.h b/ripngd/ripngd.h
index 3df79541aa..8319cf9c1e 100644
--- a/ripngd/ripngd.h
+++ b/ripngd/ripngd.h
@@ -334,11 +334,9 @@ extern struct thread_master *master;
/* Prototypes. */
extern void ripng_init(void);
-extern void ripng_reset(void);
extern void ripng_clean(void);
extern void ripng_clean_network(void);
extern void ripng_interface_clean(void);
-extern void ripng_interface_reset(void);
extern int ripng_enable_network_add(struct prefix *p);
extern int ripng_enable_network_delete(struct prefix *p);
extern int ripng_enable_if_add(const char *ifname);
@@ -348,12 +346,10 @@ extern int ripng_passive_interface_unset(const char *ifname);
extern void ripng_passive_interface_clean(void);
extern void ripng_if_init(void);
extern void ripng_route_map_init(void);
-extern void ripng_route_map_reset(void);
extern void ripng_terminate(void);
/* zclient_init() is done by ripng_zebra.c:zebra_init() */
extern void zebra_init(struct thread_master *);
extern void ripng_zebra_stop(void);
-extern void ripng_zclient_reset(void);
extern void ripng_redistribute_conf_update(int type);
extern void ripng_redistribute_conf_delete(int type);