Browse Source

pimd: Fix configuration file reading upon startup

Without the fix, qpimd issues this error message:
pim_if_add_vif: ifindex=0 < 1 on interface swp1
It happens because in pim_main.c:main() we are initializing zebra with pim_zebra_init() after we read in the configuration with vty_read_config().

See also: https://github.com/udhos/qpimd/issues/3
Donald Sharp 4 years ago
parent
commit
d632689579
1 changed files with 5 additions and 6 deletions
  1. 5 6
      pimd/pim_main.c

+ 5 - 6
pimd/pim_main.c

@@ -216,6 +216,11 @@ int main(int argc, char** argv, char** envp) {
   zlog_default->maxlvl[ZLOG_DEST_STDOUT] = ZLOG_DISABLED;
 #endif
 
+  /*
+    Initialize zclient "update" and "lookup" sockets
+   */
+  pim_zebra_init(zebra_sock_path);
+
   zlog_notice("Loading configuration - begin");
 
   /* Get configuration file. */
@@ -278,12 +283,6 @@ int main(int argc, char** argv, char** envp) {
   zlog_notice("!HAVE_CLOCK_MONOTONIC");
 #endif
 
-
-  /*
-    Initialize zclient "update" and "lookup" sockets
-   */
-  pim_zebra_init(zebra_sock_path);
-    
   while (thread_fetch(master, &thread))
     thread_call(&thread);