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.
This commit is contained in:
paul 2004-05-11 11:31:07 +00:00
parent 48a46fa0c3
commit c50ae8baf6
4 changed files with 23 additions and 5 deletions

View File

@ -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

View File

@ -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 */

View File

@ -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 ? \

View File

@ -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