2004-05-11 Paul Jakma <paul@dishone.st>

        * ioctl.h: Add if_ioctl_ipv6 prototype and AF_IOCTL for SOLARIS_IPV6
        * kernel_socket.c: Fix SAROUNDUP, compiler doesnt like do..while
          RHS in assignments :)
        * redistribute.c: (zebra_interface_delete_update) only used
          if RTM_IFANNOUNCE and NETLINK is available.
diff --git a/zebra/ChangeLog b/zebra/ChangeLog
index d453aea..1b1e1a9 100644
--- a/zebra/ChangeLog
+++ b/zebra/ChangeLog
@@ -4,7 +4,12 @@
 	* if_ioctl_solaris.c: Fixup some erroneous privilege changes and
 	  add privs.h header.
 	* ioctl_solaris.c: ditto
-	 
+	* ioctl.h: Add if_ioctl_ipv6 prototype and AF_IOCTL for SOLARIS_IPV6
+	* kernel_socket.c: Fix SAROUNDUP, compiler doesnt like do..while
+	  RHS in assignments :)
+	* redistribute.c: (zebra_interface_delete_update) only used
+	  if RTM_IFANNOUNCE and NETLINK is available.
+		 
 2004-05-09 Paul Jakma <paul@dishone.st>
 
 	* zserv.c: (zsend_route_multipath) Set the nexthop_num
diff --git a/zebra/ioctl.h b/zebra/ioctl.h
index 157fc44..eadc69a 100644
--- a/zebra/ioctl.h
+++ b/zebra/ioctl.h
@@ -40,7 +40,15 @@
 #ifdef HAVE_IPV6
 int if_prefix_add_ipv6 (struct interface *, struct connected *);
 int if_prefix_delete_ipv6 (struct interface *, struct connected *);
-
 #endif /* HAVE_IPV6 */
 
+#ifdef SOLARIS_IPV6
+int if_ioctl_ipv6(u_long, caddr_t);
+struct connected *if_lookup_linklocal( struct interface *);
+
+#define AF_IOCTL(af, request, buffer) \
+        ((af) == AF_INET? if_ioctl(request, buffer) : \
+                          if_ioctl_ipv6(request, buffer))
+#endif /* SOLARIS_IPV6 */
+
 #endif /* _ZEBRA_IOCTL_H */
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index 9dd2615..20c6cc8 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -63,14 +63,12 @@
  * but round them up nonetheless.
  */
 #define SAROUNDUP(X) \
-    do { \
     (((struct sockaddr *)(X))->sa_family == AF_INET ?   \
       ROUNDUP(sizeof(struct sockaddr_in)):\
       (((struct sockaddr *)(X))->sa_family == AF_INET6 ? \
        ROUNDUP(sizeof(struct sockaddr_in6)) :  \
        (((struct sockaddr *)(X))->sa_family == AF_LINK ? \
-         ROUNDUP(sizeof(struct sockaddr_dl)) : sizeof(struct sockaddr)))) \
-    } while (0)
+         ROUNDUP(sizeof(struct sockaddr_dl)) : sizeof(struct sockaddr))))
 #else /* HAVE_IPV6 */ 
 #define SAROUNDUP(X) \
       (((struct sockaddr *)(X))->sa_family == AF_INET ?   \
diff --git a/zebra/redistribute.c b/zebra/redistribute.c
index ae61a44..a4335c1 100644
--- a/zebra/redistribute.c
+++ b/zebra/redistribute.c
@@ -347,6 +347,12 @@
 	zsend_interface_add (client, ifp);
 }
 
+/*
+ * This function is only called  when support for 
+ * RTM_IFANNOUNCE or AF_NETLINK sockets (RTM_DELLINK message)
+ * is available. It is not called on Solaris.
+ */
+#if (defined(RTM_IFANNOUNCE) || defined(HAVE_NETLINK))
 void
 zebra_interface_delete_update (struct interface *ifp)
 {
@@ -361,6 +367,7 @@
       if (client->ifinfo)
 	zsend_interface_delete (client, ifp);
 }
+#endif /* defined(RTM_IFANNOUNCE) || defined(HAVE_NETLINK) */
 
 /* Interface address addition. */
 void