[pim] Log physical interface up/down
[pim] Replace strerror with safe_strerror
[pim] Fix PIM socket removal from non-PIM interfaces
[pim] show ip igmp querier: left-align Querier string
[pim] Version up to 0.157
[pim] Recipe to re-sync with Quagga repository
[pim] Build vtysh in development script
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index 339f9da..c845a89 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -1084,7 +1084,7 @@
       pim_time_timer_to_hhmmss(query_hhmmss, sizeof(query_hhmmss), igmp->t_igmp_query_timer);
       pim_time_timer_to_hhmmss(other_hhmmss, sizeof(other_hhmmss), igmp->t_other_querier_timer);
 
-      vty_out(vty, "%-9s %-15s %7s %10d %11s %11s%s",
+      vty_out(vty, "%-9s %-15s %-7s %10d %11s %11s%s",
 	      ifp->name,
 	      inet_ntoa(igmp->ifaddr),
 	      igmp->t_igmp_query_timer ? "THIS" : "OTHER",
@@ -1871,7 +1871,7 @@
 	      ifp->name,
 	      pim_ifp->mroute_vif_index,
 	      e,
-	      strerror(e),
+	      safe_strerror(e),
 	      VTY_NEWLINE);	      
       continue;
     }
@@ -2047,7 +2047,7 @@
 	      source_str,
 	      group_str,
 	      e,
-	      strerror(e),
+	      safe_strerror(e),
 	      VTY_NEWLINE);	      
       continue;
     }
@@ -2093,7 +2093,7 @@
   result = inet_pton(AF_INET, addr_str, &addr);
   if (result <= 0) {
     vty_out(vty, "Bad unicast address %s: errno=%d: %s%s",
-	    addr_str, errno, strerror(errno), VTY_NEWLINE);
+	    addr_str, errno, safe_strerror(errno), VTY_NEWLINE);
     return CMD_WARNING;
   }
 
@@ -2265,7 +2265,7 @@
   result = inet_pton(AF_INET, group_str, &group_addr);
   if (result <= 0) {
     vty_out(vty, "Bad group address %s: errno=%d: %s%s",
-	    group_str, errno, strerror(errno), VTY_NEWLINE);
+	    group_str, errno, safe_strerror(errno), VTY_NEWLINE);
     return CMD_WARNING;
   }
 
@@ -2274,7 +2274,7 @@
   result = inet_pton(AF_INET, source_str, &source_addr);
   if (result <= 0) {
     vty_out(vty, "Bad source address %s: errno=%d: %s%s",
-	    source_str, errno, strerror(errno), VTY_NEWLINE);
+	    source_str, errno, safe_strerror(errno), VTY_NEWLINE);
     return CMD_WARNING;
   }
 
@@ -2312,7 +2312,7 @@
   result = inet_pton(AF_INET, group_str, &group_addr);
   if (result <= 0) {
     vty_out(vty, "Bad group address %s: errno=%d: %s%s",
-	    group_str, errno, strerror(errno), VTY_NEWLINE);
+	    group_str, errno, safe_strerror(errno), VTY_NEWLINE);
     return CMD_WARNING;
   }
 
@@ -2321,7 +2321,7 @@
   result = inet_pton(AF_INET, source_str, &source_addr);
   if (result <= 0) {
     vty_out(vty, "Bad source address %s: errno=%d: %s%s",
-	    source_str, errno, strerror(errno), VTY_NEWLINE);
+	    source_str, errno, safe_strerror(errno), VTY_NEWLINE);
     return CMD_WARNING;
   }
 
@@ -3168,7 +3168,7 @@
   result = inet_pton(AF_INET, grp_str, &grp_addr);
   if (result <= 0) {
     vty_out(vty, "Bad group address %s: errno=%d: %s%s",
-	    grp_str, errno, strerror(errno), VTY_NEWLINE);
+	    grp_str, errno, safe_strerror(errno), VTY_NEWLINE);
     return CMD_WARNING;
   }
 
@@ -3204,7 +3204,7 @@
     result = inet_pton(AF_INET, src_str, src_addr);
     if (result <= 0) {
       vty_out(vty, "Bad source address %s: errno=%d: %s%s",
-	      src_str, errno, strerror(errno), VTY_NEWLINE);
+	      src_str, errno, safe_strerror(errno), VTY_NEWLINE);
       return CMD_WARNING;
     }
   }
@@ -3281,7 +3281,7 @@
   result = inet_pton(AF_INET, neigh_str, &neigh_addr);
   if (result <= 0) {
     vty_out(vty, "Bad neighbor address %s: errno=%d: %s%s",
-	    neigh_str, errno, strerror(errno), VTY_NEWLINE);
+	    neigh_str, errno, safe_strerror(errno), VTY_NEWLINE);
     return CMD_WARNING;
   }
 
@@ -3314,7 +3314,7 @@
     result = inet_pton(AF_INET, sec_str, &sec_addr);
     if (result <= 0) {
       vty_out(vty, "Bad neighbor secondary address %s: errno=%d: %s%s",
-	      sec_str, errno, strerror(errno), VTY_NEWLINE);
+	      sec_str, errno, safe_strerror(errno), VTY_NEWLINE);
       return CMD_WARNING;
     }
 
@@ -3407,7 +3407,7 @@
   result = inet_pton(AF_INET, neigh_str, &neigh_addr);
   if (result <= 0) {
     vty_out(vty, "Bad neighbor address %s: errno=%d: %s%s",
-	    neigh_str, errno, strerror(errno), VTY_NEWLINE);
+	    neigh_str, errno, safe_strerror(errno), VTY_NEWLINE);
     return CMD_WARNING;
   }
 
@@ -3416,7 +3416,7 @@
   result = inet_pton(AF_INET, group_str, &group_addr);
   if (result <= 0) {
     vty_out(vty, "Bad group address %s: errno=%d: %s%s",
-	    group_str, errno, strerror(errno), VTY_NEWLINE);
+	    group_str, errno, safe_strerror(errno), VTY_NEWLINE);
     return CMD_WARNING;
   }
 
@@ -3425,7 +3425,7 @@
   result = inet_pton(AF_INET, source_str, &source_addr);
   if (result <= 0) {
     vty_out(vty, "Bad source address %s: errno=%d: %s%s",
-	    source_str, errno, strerror(errno), VTY_NEWLINE);
+	    source_str, errno, safe_strerror(errno), VTY_NEWLINE);
     return CMD_WARNING;
   }
 
@@ -3523,7 +3523,7 @@
   result = inet_pton(AF_INET, neigh_dst_str, &neigh_dst_addr);
   if (result <= 0) {
     vty_out(vty, "Bad neighbor destination address %s: errno=%d: %s%s",
-	    neigh_dst_str, errno, strerror(errno), VTY_NEWLINE);
+	    neigh_dst_str, errno, safe_strerror(errno), VTY_NEWLINE);
     return CMD_WARNING;
   }
 
@@ -3532,7 +3532,7 @@
   result = inet_pton(AF_INET, neigh_src_str, &neigh_src_addr);
   if (result <= 0) {
     vty_out(vty, "Bad neighbor source address %s: errno=%d: %s%s",
-	    neigh_src_str, errno, strerror(errno), VTY_NEWLINE);
+	    neigh_src_str, errno, safe_strerror(errno), VTY_NEWLINE);
     return CMD_WARNING;
   }
 
@@ -3541,7 +3541,7 @@
   result = inet_pton(AF_INET, group_str, &group_addr);
   if (result <= 0) {
     vty_out(vty, "Bad group address %s: errno=%d: %s%s",
-	    group_str, errno, strerror(errno), VTY_NEWLINE);
+	    group_str, errno, safe_strerror(errno), VTY_NEWLINE);
     return CMD_WARNING;
   }
 
@@ -3550,7 +3550,7 @@
   result = inet_pton(AF_INET, source_str, &source_addr);
   if (result <= 0) {
     vty_out(vty, "Bad source address %s: errno=%d: %s%s",
-	    source_str, errno, strerror(errno), VTY_NEWLINE);
+	    source_str, errno, safe_strerror(errno), VTY_NEWLINE);
     return CMD_WARNING;
   }
 
@@ -3740,7 +3740,7 @@
   result = inet_pton(AF_INET, group_str, &msg.im_dst);
   if (result <= 0) {
     vty_out(vty, "Bad group address %s: errno=%d: %s%s",
-	    group_str, errno, strerror(errno), VTY_NEWLINE);
+	    group_str, errno, safe_strerror(errno), VTY_NEWLINE);
     return CMD_WARNING;
   }
 
@@ -3749,7 +3749,7 @@
   result = inet_pton(AF_INET, source_str, &msg.im_src);
   if (result <= 0) {
     vty_out(vty, "Bad source address %s: errno=%d: %s%s",
-	    source_str, errno, strerror(errno), VTY_NEWLINE);
+	    source_str, errno, safe_strerror(errno), VTY_NEWLINE);
     return CMD_WARNING;
   }
 
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c
index b4fbaec..b3df018 100644
--- a/pimd/pim_iface.c
+++ b/pimd/pim_iface.c
@@ -1020,7 +1020,7 @@
     pim_inet4_dump("<src?>", source_addr, source_str, sizeof(source_str));
     zlog_warn("%s: failure closing sock_fd=%d for IGMP group %s source %s on interface %s: errno=%d: %s",
 	      __PRETTY_FUNCTION__,
-	      ij->sock_fd, group_str, source_str, ifp->name, e, strerror(e));
+	      ij->sock_fd, group_str, source_str, ifp->name, e, safe_strerror(e));
     /* warning only */
   }
   listnode_delete(pim_ifp->igmp_join_list, ij);
diff --git a/pimd/pim_igmp.c b/pimd/pim_igmp.c
index e38ac96..b8f2581 100644
--- a/pimd/pim_igmp.c
+++ b/pimd/pim_igmp.c
@@ -65,7 +65,7 @@
     else {
       zlog_warn("%s %s: IGMP socket fd=%d interface %s: could not solve %s to group address: errno=%d: %s",
 		__FILE__, __PRETTY_FUNCTION__, fd, inet_ntoa(ifaddr),
-		PIM_ALL_ROUTERS, errno, strerror(errno));
+		PIM_ALL_ROUTERS, errno, safe_strerror(errno));
     }
   }
 
@@ -80,7 +80,7 @@
   else {
     zlog_warn("%s %s: IGMP socket fd=%d interface %s: could not solve %s to group address: errno=%d: %s",
 	      __FILE__, __PRETTY_FUNCTION__, fd, inet_ntoa(ifaddr),
-	      PIM_ALL_SYSTEMS, errno, strerror(errno));
+	      PIM_ALL_SYSTEMS, errno, safe_strerror(errno));
   }
 
   if (inet_aton(PIM_ALL_IGMP_ROUTERS, &group)) {
@@ -91,7 +91,7 @@
   else {
       zlog_warn("%s %s: IGMP socket fd=%d interface %s: could not solve %s to group address: errno=%d: %s",
 		__FILE__, __PRETTY_FUNCTION__, fd, inet_ntoa(ifaddr),
-		PIM_ALL_IGMP_ROUTERS, errno, strerror(errno));
+		PIM_ALL_IGMP_ROUTERS, errno, safe_strerror(errno));
   }    
 
   if (!join) {
@@ -949,7 +949,7 @@
 			      &ifindex);
   if (len < 0) {
     zlog_warn("Failure receiving IP IGMP packet on fd=%d: errno=%d: %s",
-	      fd, errno, strerror(errno));
+	      fd, errno, safe_strerror(errno));
     goto done;
   }
 
@@ -1023,7 +1023,7 @@
   if (close(igmp->fd)) {
     zlog_err("Failure closing IGMP socket %s fd=%d on interface %s: errno=%d: %s",
 	     inet_ntoa(igmp->ifaddr), igmp->fd, igmp->interface->name,
-	     errno, strerror(errno));
+	     errno, safe_strerror(errno));
   }
   
   if (PIM_DEBUG_IGMP_TRACE) {
diff --git a/pimd/pim_igmpv3.c b/pimd/pim_igmpv3.c
index f9fa123..3ff04c9 100644
--- a/pimd/pim_igmpv3.c
+++ b/pimd/pim_igmpv3.c
@@ -1679,7 +1679,7 @@
       zlog_warn("%s: sendto() failure to %s on %s: group=%s msg_size=%d: errno=%d: %s",
 		__PRETTY_FUNCTION__,
 		dst_str, ifname, group_str, msg_size,
-		e, strerror(e));
+		e, safe_strerror(e));
     }
     else {
       zlog_warn("%s: sendto() partial to %s on %s: group=%s msg_size=%d: sent=%d",
diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c
index 48213b0..c76ba52 100644
--- a/pimd/pim_mroute.c
+++ b/pimd/pim_mroute.c
@@ -47,7 +47,7 @@
     int e = errno;
     zlog_warn("%s %s: failure: setsockopt(fd=%d,IPPROTO_IP,%s=%d): errno=%d: %s",
 	      __FILE__, __PRETTY_FUNCTION__,
-	      fd, enable ? "MRT_INIT" : "MRT_DONE", opt, e, strerror(e));
+	      fd, enable ? "MRT_INIT" : "MRT_DONE", opt, e, safe_strerror(e));
     errno = e;
     return -1;
   }
@@ -209,7 +209,7 @@
   rd = read(fd, buf, sizeof(buf));
   if (rd < 0) {
     zlog_warn("%s: failure reading fd=%d: errno=%d: %s",
-	      __PRETTY_FUNCTION__, fd, errno, strerror(errno));
+	      __PRETTY_FUNCTION__, fd, errno, safe_strerror(errno));
     return -2;
   }
 
@@ -275,13 +275,13 @@
 
   if (fd < 0) {
     zlog_warn("Could not create mroute socket: errno=%d: %s",
-	      errno, strerror(errno));
+	      errno, safe_strerror(errno));
     return -2;
   }
 
   if (pim_mroute_set(fd, 1)) {
     zlog_warn("Could not enable mroute on socket fd=%d: errno=%d: %s",
-	      fd, errno, strerror(errno));
+	      fd, errno, safe_strerror(errno));
     close(fd);
     return -3;
   }
@@ -302,13 +302,13 @@
 
   if (pim_mroute_set(qpim_mroute_socket_fd, 0)) {
     zlog_warn("Could not disable mroute on socket fd=%d: errno=%d: %s",
-	      qpim_mroute_socket_fd, errno, strerror(errno));
+	      qpim_mroute_socket_fd, errno, safe_strerror(errno));
     return -2;
   }
 
   if (close(qpim_mroute_socket_fd)) {
     zlog_warn("Failure closing mroute socket: fd=%d errno=%d: %s",
-	      qpim_mroute_socket_fd, errno, strerror(errno));
+	      qpim_mroute_socket_fd, errno, safe_strerror(errno));
     return -3;
   }
 
@@ -359,7 +359,7 @@
     zlog_warn("%s %s: failure: setsockopt(fd=%d,IPPROTO_IP,MRT_ADD_VIF,vif_index=%d,ifaddr=%s): errno=%d: %s",
 	      __FILE__, __PRETTY_FUNCTION__,
 	      qpim_mroute_socket_fd, vif_index, ifaddr_str,
-	      e, strerror(e));
+	      e, safe_strerror(e));
     errno = e;
     return -2;
   }
@@ -387,7 +387,7 @@
     zlog_warn("%s %s: failure: setsockopt(fd=%d,IPPROTO_IP,MRT_DEL_VIF,vif_index=%d): errno=%d: %s",
 	      __FILE__, __PRETTY_FUNCTION__,
 	      qpim_mroute_socket_fd, vif_index,
-	      e, strerror(e));
+	      e, safe_strerror(e));
     errno = e;
     return -2;
   }
@@ -412,7 +412,7 @@
     zlog_warn("%s %s: failure: setsockopt(fd=%d,IPPROTO_IP,MRT_ADD_MFC): errno=%d: %s",
 	      __FILE__, __PRETTY_FUNCTION__,
 	      qpim_mroute_socket_fd,
-	      e, strerror(e));
+	      e, safe_strerror(e));
     errno = e;
     return -2;
   }
@@ -436,7 +436,7 @@
     zlog_warn("%s %s: failure: setsockopt(fd=%d,IPPROTO_IP,MRT_DEL_MFC): errno=%d: %s",
 	      __FILE__, __PRETTY_FUNCTION__,
 	      qpim_mroute_socket_fd,
-	      e, strerror(e));
+	      e, safe_strerror(e));
     errno = e;
     return -2;
   }
diff --git a/pimd/pim_pim.c b/pimd/pim_pim.c
index bbf6776..dd78b90 100644
--- a/pimd/pim_pim.c
+++ b/pimd/pim_pim.c
@@ -74,7 +74,7 @@
   if (close(pim_ifp->pim_sock_fd)) {
     zlog_warn("Failure closing PIM socket fd=%d on interface %s: errno=%d: %s",
 	      pim_ifp->pim_sock_fd, ifp->name,
-	      errno, strerror(errno));
+	      errno, safe_strerror(errno));
   }
   
   pim_ifp->pim_sock_fd = -1;
@@ -91,6 +91,12 @@
   zlog_info("PIM INTERFACE DOWN: on interface %s: %s",
 	    ifp->name, delete_message);
 
+  if (!ifp->info) {
+    zlog_err("%s: %s: but PIM not enabled on interface %s (!)",
+	     __PRETTY_FUNCTION__, delete_message, ifp->name);
+    return;
+  }
+
   /*
     RFC 4601: 4.3.1.  Sending Hello Messages
     
@@ -266,7 +272,7 @@
 			      &ifindex);
   if (len < 0) {
     zlog_warn("Failure receiving IP PIM packet on fd=%d: errno=%d: %s",
-	      fd, errno, strerror(errno));
+	      fd, errno, safe_strerror(errno));
     goto done;
   }
 
@@ -459,7 +465,7 @@
       zlog_warn("%s: sendto() failure to %s on %s: fd=%d msg_size=%d: errno=%d: %s",
 		__PRETTY_FUNCTION__,
 		dst_str, ifname, fd, pim_msg_size,
-		e, strerror(e));
+		e, safe_strerror(e));
     }
     else {
       zlog_warn("%s: sendto() partial to %s on %s: fd=%d msg_size=%d: sent=%d",
diff --git a/pimd/pim_sock.c b/pimd/pim_sock.c
index 9f34641..8e6c559 100644
--- a/pimd/pim_sock.c
+++ b/pimd/pim_sock.c
@@ -68,7 +68,7 @@
 
   if (fd < 0) {
     zlog_warn("Could not create raw socket: errno=%d: %s",
-	      errno, strerror(errno));
+	      errno, safe_strerror(errno));
     return PIM_SOCK_ERR_SOCKET;
   }
   
@@ -82,7 +82,7 @@
   fd = pim_socket_raw(protocol);
   if (fd < 0) {
     zlog_warn("Could not create multicast socket: errno=%d: %s",
-	      errno, strerror(errno));
+	      errno, safe_strerror(errno));
     return PIM_SOCK_ERR_SOCKET;
   }
 
@@ -93,14 +93,14 @@
     int opt = 1;
     if (setsockopt(fd, SOL_IP, IP_PKTINFO, &opt, sizeof(opt))) {
       zlog_warn("Could not set IP_PKTINFO on socket fd=%d: errno=%d: %s",
-		fd, errno, strerror(errno));
+		fd, errno, safe_strerror(errno));
     }
 #elif defined(HAVE_IP_RECVDSTADDR)
     /* BSD IP_RECVDSTADDR */
     int opt = 1;
     if (setsockopt(fd, IPPROTO_IP, IP_RECVDSTADDR, &opt, sizeof(opt))) {
       zlog_warn("Could not set IP_RECVDSTADDR on socket fd=%d: errno=%d: %s",
-		fd, errno, strerror(errno));
+		fd, errno, safe_strerror(errno));
     }
 #else
     zlog_err("%s %s: Missing IP_PKTINFO and IP_RECVDSTADDR: unable to get dst addr from recvmsg()",
@@ -120,7 +120,7 @@
     ra[3] = 0;
     if (setsockopt(fd, IPPROTO_IP, IP_OPTIONS, ra, 4)) {
       zlog_warn("Could not set Router Alert Option on socket fd=%d: errno=%d: %s",
-		fd, errno, strerror(errno));
+		fd, errno, safe_strerror(errno));
       close(fd);
       return PIM_SOCK_ERR_RA;
     }
@@ -131,7 +131,7 @@
     if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
 		   (void *) &reuse, sizeof(reuse))) {
       zlog_warn("Could not set Reuse Address Option on socket fd=%d: errno=%d: %s",
-		fd, errno, strerror(errno));
+		fd, errno, safe_strerror(errno));
       close(fd);
       return PIM_SOCK_ERR_REUSE;
     }
@@ -143,7 +143,7 @@
     if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL,
 		   (void *) &ttl, sizeof(ttl))) {
       zlog_warn("Could not set multicast TTL=%d on socket fd=%d: errno=%d: %s",
-		MTTL, fd, errno, strerror(errno));
+		MTTL, fd, errno, safe_strerror(errno));
       close(fd);
       return PIM_SOCK_ERR_TTL;
     }
@@ -153,7 +153,7 @@
 		 (void *) &loop, sizeof(loop))) {
     zlog_warn("Could not %s Multicast Loopback Option on socket fd=%d: errno=%d: %s",
 	      loop ? "enable" : "disable",
-	      fd, errno, strerror(errno));
+	      fd, errno, safe_strerror(errno));
     close(fd);
     return PIM_SOCK_ERR_LOOP;
   }
@@ -161,7 +161,7 @@
   if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF,
 		 (void *) &ifaddr, sizeof(ifaddr))) {
     zlog_warn("Could not set Outgoing Interface Option on socket fd=%d: errno=%d: %s",
-	      fd, errno, strerror(errno));
+	      fd, errno, safe_strerror(errno));
     close(fd);
     return PIM_SOCK_ERR_IFACE;
   }
@@ -172,14 +172,14 @@
     flags = fcntl(fd, F_GETFL, 0);
     if (flags < 0) {
       zlog_warn("Could not get fcntl(F_GETFL,O_NONBLOCK) on socket fd=%d: errno=%d: %s",
-		fd, errno, strerror(errno));
+		fd, errno, safe_strerror(errno));
       close(fd);
       return PIM_SOCK_ERR_NONBLOCK_GETFL;
     }
 
     if (fcntl(fd, F_SETFL, flags | O_NONBLOCK)) {
       zlog_warn("Could not set fcntl(F_SETFL,O_NONBLOCK) on socket fd=%d: errno=%d: %s",
-		fd, errno, strerror(errno));
+		fd, errno, safe_strerror(errno));
       close(fd);
       return PIM_SOCK_ERR_NONBLOCK_SETFL;
     }
@@ -218,7 +218,7 @@
       sprintf(ifaddr_str, "<ifaddr?>");
 
     zlog_err("Failure socket joining fd=%d group %s on interface address %s: errno=%d: %s",
-	     fd, group_str, ifaddr_str, errno, strerror(errno));
+	     fd, group_str, ifaddr_str, errno, safe_strerror(errno));
     return ret;
   }
 
@@ -268,7 +268,7 @@
     zlog_warn("%s: setsockopt(fd=%d) failure for IGMP group %s source %s ifindex %d on interface %s: errno=%d: %s",
 	      __PRETTY_FUNCTION__,
 	      fd, group_str, source_str, ifindex, ifname,
-	      e, strerror(e));
+	      e, safe_strerror(e));
     return -1;
   }
 
@@ -352,7 +352,7 @@
 		 &loop, &loop_len)) {
     int e = errno;
     zlog_warn("Could not get Multicast Loopback Option on socket fd=%d: errno=%d: %s",
-	      fd, errno, strerror(errno));
+	      fd, errno, safe_strerror(errno));
     errno = e;
     return PIM_SOCK_ERR_LOOP;
   }
diff --git a/pimd/pim_str.c b/pimd/pim_str.c
index 7dce7a8..af5a184 100644
--- a/pimd/pim_str.c
+++ b/pimd/pim_str.c
@@ -37,7 +37,7 @@
   if (!inet_ntop(AF_INET, &addr, buf, buf_size)) {
     int e = errno;
     zlog_warn("pim_inet4_dump: inet_ntop(AF_INET,buf_size=%d): errno=%d: %s",
-	      buf_size, e, strerror(e));
+	      buf_size, e, safe_strerror(e));
     if (onfail)
       snprintf(buf, buf_size, "%s", onfail);
   }
diff --git a/pimd/pim_time.c b/pimd/pim_time.c
index a837e5b..63861e5 100644
--- a/pimd/pim_time.c
+++ b/pimd/pim_time.c
@@ -49,7 +49,7 @@
   if (pim_gettime(CLOCK_MONOTONIC, &now_tv)) {
     zlog_err("%s: gettime(CLOCK_MONOTONIC) failure: errno=%d: %s",
 	     __PRETTY_FUNCTION__,
-	     errno, strerror(errno));
+	     errno, safe_strerror(errno));
     return -1;
   }
 
@@ -68,7 +68,7 @@
   if (pim_gettime(CLOCK_MONOTONIC, &now_tv)) {
     zlog_err("%s: gettime(CLOCK_MONOTONIC) failure: errno=%d: %s",
 	     __PRETTY_FUNCTION__,
-	     errno, strerror(errno));
+	     errno, safe_strerror(errno));
     return -1;
   }
 
diff --git a/pimd/pim_version.h b/pimd/pim_version.h
index 796db66..fc5bca2 100644
--- a/pimd/pim_version.h
+++ b/pimd/pim_version.h
@@ -23,7 +23,7 @@
 #ifndef PIM_VERSION_H
 #define PIM_VERSION_H
 
-#define PIMD_VERSION_STR "0.155"
+#define PIMD_VERSION_STR "0.157"
 
 const char * const PIMD_VERSION;
 
diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c
index d03cc54..56e4dba 100644
--- a/pimd/pim_zebra.c
+++ b/pimd/pim_zebra.c
@@ -127,6 +127,8 @@
   if (!ifp)
     return 0;
 
+  zlog_info("INTERFACE UP: %s", ifp->name);
+
   if (PIM_DEBUG_ZEBRA) {
     zlog_debug("%s: %s index %d flags %ld metric %d mtu %d operative %d",
 	       __PRETTY_FUNCTION__,
@@ -157,6 +159,8 @@
   if (!ifp)
     return 0;
 
+  zlog_info("INTERFACE DOWN: %s", ifp->name);
+
   if (PIM_DEBUG_ZEBRA) {
     zlog_debug("%s: %s index %d flags %ld metric %d mtu %d operative %d",
 	       __PRETTY_FUNCTION__,
@@ -175,7 +179,9 @@
       pim_sock_delete() closes the socket, stops read and timer threads,
       and kills all neighbors.
     */
-    pim_sock_delete(ifp, "link down");
+    if (ifp->info) {
+      pim_sock_delete(ifp, "link down");
+    }
   }
 
   return 0;
diff --git a/pimd/pimd.c b/pimd/pimd.c
index cbcd064..f255a28 100644
--- a/pimd/pimd.c
+++ b/pimd/pimd.c
@@ -72,7 +72,7 @@
   if (!inet_aton(PIM_ALL_PIM_ROUTERS, &qpim_all_pim_routers_addr)) {
     zlog_err("%s %s: could not solve %s to group address: errno=%d: %s",
 	     __FILE__, __PRETTY_FUNCTION__,
-	     PIM_ALL_PIM_ROUTERS, errno, strerror(errno));
+	     PIM_ALL_PIM_ROUTERS, errno, safe_strerror(errno));
     zassert(0);
     return;
   }
diff --git a/pimd/quagga-configure.sh b/pimd/quagga-configure.sh
index a1cdd58..45d7be0 100755
--- a/pimd/quagga-configure.sh
+++ b/pimd/quagga-configure.sh
@@ -7,4 +7,4 @@
 #
 # $QuaggaId: $Format:%an, %ai, %h$ $
 
-./configure --disable-bgpd --disable-ripd --disable-ripngd --disable-ospfd --disable-ospf6d --disable-watchquagga --disable-bgp-announce --disable-ospfapi --disable-ospfclient --disable-rtadv --disable-irdp --enable-pimd --enable-tcp-zebra --enable-ipv6
+./configure --disable-bgpd --disable-ripd --disable-ripngd --disable-ospfd --disable-ospf6d --disable-watchquagga --disable-bgp-announce --disable-ospfapi --disable-ospfclient --disable-rtadv --disable-irdp --enable-pimd --enable-tcp-zebra --enable-ipv6 --enable-vtysh
diff --git a/pimd/savannah-git-clone.sh b/pimd/savannah-git-clone.sh
index 68fd608..1aad51b 100755
--- a/pimd/savannah-git-clone.sh
+++ b/pimd/savannah-git-clone.sh
@@ -11,6 +11,17 @@
 # Commit changes:                git commit -a
 # Send changes:                  git push --all
 #
+# Recipe to re-sync with Quagga repository:
+#  git clone ssh://evertonm@git.sv.gnu.org/srv/git/qpimd.git quagga
+#  cd quagga
+#  git checkout master
+#  git pull git://code.quagga.net/quagga.git master
+#  git checkout -b pim origin/pim
+#  git rebase master pim
+#  # Test, then push back into Savannah repository:
+#  git push origin :pim ;# delete remote branch pim
+#  git push --all
+#
 # $QuaggaId: $Format:%an, %ai, %h$ $
 
 git clone ssh://evertonm@git.sv.gnu.org/srv/git/qpimd.git quagga