]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #740 from donaldsharp/ospf_commands
authorJafar Al-Gharaibeh <Jafaral@users.noreply.github.com>
Fri, 30 Jun 2017 17:28:13 +0000 (12:28 -0500)
committerGitHub <noreply@github.com>
Fri, 30 Jun 2017 17:28:13 +0000 (12:28 -0500)
ospfd: Fix 'advanced' type data base show

19 files changed:
babeld/babel_zebra.c
bgpd/.gitignore
eigrpd/eigrpd.c
isisd/isis_main.c
isisd/isis_zebra.c
isisd/isis_zebra.h
lib/.gitignore
lib/thread.c
nhrpd/nhrp_route.c
ospf6d/ospf6_main.c
ospfd/ospfd.c
pimd/pim_zlookup.c
pimd/pimd.c
ripd/rip_main.c
ripd/rip_zebra.c
ripd/ripd.h
ripngd/ripng_main.c
ripngd/ripng_zebra.c
ripngd/ripngd.h

index d8b8919e215ac99810d3c16fc9929bfdb53ea507..3a7a52cccadbfb2c2a0c6e4ef260d67fb650e29c 100644 (file)
@@ -400,4 +400,5 @@ void
 babel_zebra_close_connexion(void)
 {
     zclient_stop(zclient);
+    zclient_free(zclient);
 }
index 105be2299503e9b435b7ada521e2c4f733c9ce1d..a97bdb83d3555182609f5910882675bb25fa5f76 100644 (file)
@@ -16,3 +16,4 @@ TAGS
 .arch-ids
 *~
 *.loT
+*clippy.c
index a0ead05224acfbef6c208c903faa716ef90da9d2..2fa8296ce2677f84a681b7c60aaf356fd055e4af 100644 (file)
@@ -267,8 +267,10 @@ eigrp_finish (struct eigrp *eigrp)
       && (listcount(eigrp_om->eigrp) == 0))
     {
       if (zclient)
-        zclient_free (zclient);
-
+       {
+         zclient_stop (zclient);
+         zclient_free (zclient);
+       }
       exit(0);
     }
 
index 58070c7f2ad1bad7a22f310793277696f879b06e..674592f46b4243ed0db8ed152c296a85cd85328d 100644 (file)
@@ -101,6 +101,7 @@ void sigusr1(void);
 static __attribute__((__noreturn__)) void
 terminate (int i)
 {
+  isis_zebra_stop ();
   exit (i);
 }
 
index 0009dd5e27fb593df9f96737cf91c7d407d83d41..af77250a01ec9883ccf09e9fca04c45b37aef27b 100644 (file)
@@ -720,3 +720,10 @@ isis_zebra_init (struct thread_master *master)
 
   return;
 }
+
+void
+isis_zebra_stop (void)
+{
+  zclient_stop (zclient);
+  zclient_free (zclient);
+}
index 621c32c3636da9e2660538756eb9e690d46935f1..82d5a48d3e04383161249bded203c3bb6f65717c 100644 (file)
@@ -25,6 +25,8 @@
 extern struct zclient *zclient;
 
 void isis_zebra_init(struct thread_master *);
+void isis_zebra_stop(void);
+
 void isis_zebra_route_update (struct prefix *prefix,
                              struct isis_route_info *route_info);
 int isis_distribute_list_update (int routetype);
index 10b8704ab265fe00bed67121cb06120b356258fa..60cde149f5e29e1774108ee99fcd48a49a64c608 100644 (file)
@@ -22,3 +22,6 @@ command_parse.c
 command_parse.h
 refix
 grammar_sandbox
+clippy
+defun_lex.c
+plist_clippy.c
index bc52d1b134efedf922d2a6d3b14106133ecd0b5d..801168a79944ef448247ebc3a5af24f13aa1775d 100644 (file)
@@ -1320,7 +1320,7 @@ thread_fetch (struct thread_master *m, struct thread *fetch)
   struct timeval now;
   struct timeval zerotime = { 0, 0 };
   struct timeval tv;
-  struct timeval *tw;
+  struct timeval *tw = NULL;
 
   int num = 0;
 
index 7f8cad6e92180f19a763c7bf52f5d37efe50a1ef..89972f8f981054281e48fe74092149e975dd6960 100644 (file)
@@ -379,6 +379,7 @@ void nhrp_zebra_init(void)
 void nhrp_zebra_terminate(void)
 {
        zclient_stop(zclient);
+       zclient_free(zclient);
        route_table_finish(zebra_rib[AFI_IP]);
        route_table_finish(zebra_rib[AFI_IP6]);
 }
index f69c1e1bca4c2f1c26ea639963c9223bd6fc7b75..0a4a3a28c3a36c0bd6f88baa909e396a12a70238 100644 (file)
@@ -110,7 +110,10 @@ ospf6_exit (int status)
   cmd_terminate ();
 
   if (zclient)
-    zclient_free (zclient);
+    {
+      zclient_stop (zclient);
+      zclient_free (zclient);
+    }
 
   if (master)
     thread_master_free (master);
index 38213aeb6ad41ad31a642b639daa17b89c0b99dd..9af9f7f31455c000d844e3858f2fa0a0a155067a 100644 (file)
@@ -497,6 +497,8 @@ ospf_terminate (void)
    * One or more ospf_finish()'s may have deferred shutdown to a timer
    * thread
    */
+  zclient_stop (zclient);
+  zclient_free (zclient);
 }
 
 void
index 779cc1418383681442c02ca379e882579ba106bf..e7ffe0f4adc9a31160cb570a929a59113ecaf06a 100644 (file)
@@ -115,6 +115,7 @@ static void zclient_lookup_failed(struct zclient *zlookup)
 void
 zclient_lookup_free (void)
 {
+  zclient_stop (zlookup);
   zclient_free (zlookup);
   zlookup = NULL;
 }
index c31d2a99a11a035eca9aa8023dcb37bcd4aded78..ec1fe5b6d0f2c34abf5213b4c4c6cb4ee4b529be 100644 (file)
@@ -313,6 +313,8 @@ void pim_init()
 
 void pim_terminate()
 {
+  struct zclient *zclient;
+
   pim_free();
 
   /* reverse prefix_list_init */
@@ -321,4 +323,11 @@ void pim_terminate()
   prefix_list_reset ();
 
   pim_vrf_terminate ();
+
+  zclient = pim_zebra_zclient_get ();
+  if (zclient)
+    {
+      zclient_stop (zclient);
+      zclient_free (zclient);
+    }
 }
index 38c2875949fec23a1fd0ca941bd05c8d583f9073..1a7d03bca173df764244b0b5ce06eca8eee2af99 100644 (file)
@@ -100,6 +100,8 @@ sigint (void)
   if (! retain_mode)
     rip_clean ();
 
+  rip_zclient_stop ();
+
   exit (0);
 }
 
index 337555b0b70526fa03de1abc5f9a7f99de61882b..31204872acf3aef4a57b261e31f7fb4ec1d5548e 100644 (file)
@@ -711,3 +711,10 @@ rip_zclient_init (struct thread_master *master)
   install_element (RIP_NODE, &rip_default_information_originate_cmd);
   install_element (RIP_NODE, &no_rip_default_information_originate_cmd);
 }
+
+void
+rip_zclient_stop (void)
+{
+  zclient_stop (zclient);
+  zclient_free (zclient);
+}
index d52df0d9921c715555a6b23a194bfb04b2b21804..a8e65d12366281b8f1c79fa0e9368231c0c9e78f 100644 (file)
@@ -388,6 +388,7 @@ extern void rip_if_down_all (void);
 extern void rip_route_map_init (void);
 extern void rip_route_map_reset (void);
 extern void rip_zclient_init(struct thread_master *);
+extern void rip_zclient_stop(void);
 extern void rip_zclient_reset (void);
 extern void rip_offset_init (void);
 extern int if_check_address (struct in_addr addr);
index e5178171471f3b9d05792d1aefd834826dd6815e..9d700305edd7f8e38bd933006a6cee378fb29092 100644 (file)
@@ -103,6 +103,7 @@ sigint (void)
   if (! retain_mode)
     ripng_clean ();
 
+  ripng_zebra_stop ();
   exit (0);
 }
 
index 2d62823b115fee00ec08d8c94e97c15ce92fcf42..465d33992f26363e4a59ade8928a9524a1d4e47e 100644 (file)
@@ -557,3 +557,10 @@ zebra_init (struct thread_master *master)
   install_element (RIPNG_NODE, &ripng_redistribute_type_metric_routemap_cmd);
   install_element (RIPNG_NODE, &no_ripng_redistribute_type_cmd);
 }
+
+void
+ripng_zebra_stop (void)
+{
+  zclient_stop (zclient);
+  zclient_free (zclient);
+}
index 62b7b073f87c04a677ecc265816d3ccc675ceabf..ce8ea07a41e13a66be1790ad9663a1bad1efc85b 100644 (file)
@@ -353,6 +353,7 @@ 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_offset_init (void);