pimd: Cleanup interface startup

This patch cleans up some interface startup, removes duplicate
debug messages and protects against some always being displayed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c
index de56d04..930dad0 100644
--- a/pimd/pim_iface.c
+++ b/pimd/pim_iface.c
@@ -249,35 +249,6 @@
   pim_hello_restart_now(ifp);         /* send hello and restart timer */
 }
 
-static void on_primary_address_change(struct interface *ifp,
-				      const char *caller,
-				      struct in_addr old_addr,
-				      struct in_addr new_addr)
-{
-  struct pim_interface *pim_ifp;
-
-  if (PIM_DEBUG_ZEBRA) {
-    char old_str[100];
-    char new_str[100];
-    pim_inet4_dump("<old?>", old_addr, old_str, sizeof(old_str));
-    pim_inet4_dump("<new?>", new_addr, new_str, sizeof(new_str));
-    zlog_debug("%s: %s: primary address changed from %s to %s on interface %s",
-	       __PRETTY_FUNCTION__, caller,
-	       old_str, new_str, ifp->name);
-  }
-
-  pim_ifp = ifp->info;
-  if (!pim_ifp) {
-    return;
-  }
-
-  if (!PIM_IF_TEST_PIM(pim_ifp->options)) {
-    return;
-  }
-
-  pim_addr_change(ifp);
-}
-
 static int detect_primary_address_change(struct interface *ifp,
 					 int force_prim_as_any,
 					 const char *caller)
@@ -309,10 +280,13 @@
   }
 
   if (changed) {
-    struct in_addr old_addr = pim_ifp->primary_address;
     pim_ifp->primary_address = new_prim_addr;
 
-    on_primary_address_change(ifp, caller, old_addr, new_prim_addr);
+    if (!PIM_IF_TEST_PIM(pim_ifp->options)) {
+      return changed;
+    }
+
+    pim_addr_change(ifp);
   }
 
   return changed;
@@ -329,14 +303,9 @@
     return;
 
   changed = 1; /* true */
-  zlog_info("FIXME T31 C15 %s: on interface %s: acting on any addr change",
-	    __PRETTY_FUNCTION__, ifp->name);
-
-  if (PIM_DEBUG_ZEBRA) {
-    zlog_debug("%s: on interface %s: %s",
-	       __PRETTY_FUNCTION__, 
-	       ifp->name, changed ? "changed" : "unchanged");
-  }
+  if (PIM_DEBUG_ZEBRA)
+    zlog_debug("FIXME T31 C15 %s: on interface %s: acting on any addr change",
+	      __PRETTY_FUNCTION__, ifp->name);
 
   if (!changed) {
     return;