]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ripngd: fix SIGHUP handling
authorRenato Westphal <renato@opensourcerouting.org>
Thu, 29 Nov 2018 15:11:05 +0000 (13:11 -0200)
committerRenato Westphal <renato@opensourcerouting.org>
Mon, 3 Dec 2018 15:47:58 +0000 (13:47 -0200)
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>
ripngd/ripng_debug.c
ripngd/ripng_debug.h
ripngd/ripng_interface.c
ripngd/ripng_main.c
ripngd/ripng_routemap.c
ripngd/ripng_zebra.c
ripngd/ripngd.c
ripngd/ripngd.h

index c8cad23addfbc2161bfd7b9e0166cbee416c0467..c56ff126271bcbb0d06a0d9ac0c094e7e3ca837c 100644 (file)
@@ -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;
index 8124a1a0c93e6ff295206359293d2f82b293ea5b..81cb0f9c7ef78124d6d10216fa67b05901e38937 100644 (file)
@@ -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 */
index d349b3e094c5cde52e7db73c8d618d3192e61133..4d14fbab649290301604d853d2173e7782560426 100644 (file)
@@ -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;
index 11d12667068103b0e9c441dec93e367096251177..10e19efe77f6962fc39cea79f2378adcb0a52f1c 100644 (file)
@@ -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. */
index a18332516e4bd71f41f0f9bcc4872e736ceefac4..9a9e346a5931c33f0684e0f756f1778cd763da83 100644 (file)
@@ -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();
index 063b53cdabd0b3abac580c1957b0d2c92b64648f..e3f42edf51266ddf6cafb1a401ca06482349fbdc 100644 (file)
@@ -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,
index 3cdf5b03e333572584228e32d6e3318c96d785ff..1ac6a4d6b9672ae97b7f2f6951180f447103e2c4 100644 (file)
@@ -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;
index 3df79541aa283acbe525c6871f0ff137f669bb26..8319cf9c1e81239040a608f67b2f593c823400c9 100644 (file)
@@ -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);