summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zebra/ChangeLog7
-rw-r--r--zebra/ioctl.h10
-rw-r--r--zebra/kernel_socket.c4
-rw-r--r--zebra/redistribute.c7
4 files changed, 23 insertions, 5 deletions
diff --git a/zebra/ChangeLog b/zebra/ChangeLog
index d453aea1..1b1e1a99 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 157fc44e..eadc69a0 100644
--- a/zebra/ioctl.h
+++ b/zebra/ioctl.h
@@ -40,7 +40,15 @@ void if_get_mtu (struct interface *);
#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 9dd26157..20c6cc83 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -63,14 +63,12 @@ extern struct zebra_t zebrad;
* 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 ae61a448..a4335c17 100644
--- a/zebra/redistribute.c
+++ b/zebra/redistribute.c
@@ -347,6 +347,12 @@ zebra_interface_add_update (struct interface *ifp)
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 @@ zebra_interface_delete_update (struct interface *ifp)
if (client->ifinfo)
zsend_interface_delete (client, ifp);
}
+#endif /* defined(RTM_IFANNOUNCE) || defined(HAVE_NETLINK) */
/* Interface address addition. */
void