summaryrefslogtreecommitdiff
path: root/zebra
diff options
context:
space:
mode:
authorhasso <hasso>2003-05-25 21:04:54 +0000
committerhasso <hasso>2003-05-25 21:04:54 +0000
commit726f9b2bbdd5a607f7b0a10a64547739b807e361 (patch)
tree9c46a6ce71cf4ea96553a85a231e38b462b3dee0 /zebra
parent71c0fb50fe75928f8fbe1bbff1995d9d91b3702b (diff)
Last fixes from 6Wind patch.
Diffstat (limited to 'zebra')
-rw-r--r--zebra/connected.c3
-rw-r--r--zebra/interface.h4
-rw-r--r--zebra/ioctl.c4
-rw-r--r--zebra/kernel_socket.c7
-rw-r--r--zebra/zebra_rib.c8
-rw-r--r--zebra/zserv.c14
-rw-r--r--zebra/zserv.h6
7 files changed, 40 insertions, 6 deletions
diff --git a/zebra/connected.c b/zebra/connected.c
index 5d1c6b66..280e423e 100644
--- a/zebra/connected.c
+++ b/zebra/connected.c
@@ -263,8 +263,11 @@ connected_up_ipv6 (struct interface *ifp, struct connected *ifc)
/* Apply mask to the network. */
apply_mask_ipv6 (&p);
+#if ! defined (MUSICA) && ! defined (LINUX)
+ /* XXX: It is already done by rib_bogus_ipv6 within rib_add_ipv6 */
if (IN6_IS_ADDR_UNSPECIFIED (&p.prefix))
return;
+#endif
rib_add_ipv6 (ZEBRA_ROUTE_CONNECT, 0, &p, NULL, ifp->ifindex, 0);
diff --git a/zebra/interface.h b/zebra/interface.h
index dbfa8221..3ab624f2 100644
--- a/zebra/interface.h
+++ b/zebra/interface.h
@@ -31,7 +31,9 @@
/* Router advertisement feature. */
#if (defined(LINUX_IPV6) && (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1)) || defined(KAME)
-#define RTADV
+ #ifdef HAVE_RTADV
+ #define RTADV
+ #endif
#endif
#ifdef RTADV
diff --git a/zebra/ioctl.c b/zebra/ioctl.c
index 13afba29..3e5d1d2f 100644
--- a/zebra/ioctl.c
+++ b/zebra/ioctl.c
@@ -474,8 +474,10 @@ if_prefix_add_ipv6 (struct interface *ifp, struct connected *ifc)
#endif
memcpy (&addreq.ifra_prefixmask, &mask, sizeof (struct sockaddr_in6));
+#ifdef HAVE_IFRA_LIFETIME
addreq.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME;
addreq.ifra_lifetime.ia6t_vltime = ND6_INFINITE_LIFETIME;
+#endif
ret = if_ioctl_ipv6 (SIOCAIFADDR_IN6, (caddr_t) &addreq);
if (ret < 0)
@@ -513,8 +515,10 @@ if_prefix_delete_ipv6 (struct interface *ifp, struct connected *ifc)
#endif
memcpy (&addreq.ifra_prefixmask, &mask, sizeof (struct sockaddr_in6));
+#ifdef HAVE_IFRA_LIFETIME
addreq.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME;
addreq.ifra_lifetime.ia6t_vltime = ND6_INFINITE_LIFETIME;
+#endif
ret = if_ioctl_ipv6 (SIOCDIFADDR_IN6, (caddr_t) &addreq);
if (ret < 0)
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index 1e915d1d..17893a87 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -763,9 +763,8 @@ kernel_read (struct thread *thread)
thread_add_read (master, kernel_read, NULL, sock);
-#ifdef DEBUG
- rtmsg_debug (&buf.r.rtm);
-#endif /* DEBUG */
+ if (IS_ZEBRA_DEBUG_KERNEL)
+ rtmsg_debug (&buf.r.rtm);
rtm = &buf.r.rtm;
@@ -788,6 +787,8 @@ kernel_read (struct thread *thread)
break;
#endif /* RTM_IFANNOUNCE */
default:
+ if (IS_ZEBRA_DEBUG_KERNEL)
+ zlog_info("Unprocessed RTM_type: %d", rtm->rtm_type);
break;
}
return 0;
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 74edfbb8..d7f8bdab 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -1539,8 +1539,14 @@ int
rib_bogus_ipv6 (int type, struct prefix_ipv6 *p,
struct in6_addr *gate, unsigned int ifindex, int table)
{
- if (type == ZEBRA_ROUTE_CONNECT && IN6_IS_ADDR_UNSPECIFIED (&p->prefix))
+ if (type == ZEBRA_ROUTE_CONNECT && IN6_IS_ADDR_UNSPECIFIED (&p->prefix)) {
+#if defined (MUSICA) || defined (LINUX)
+ /* IN6_IS_ADDR_V4COMPAT(&p->prefix) */
+ if (p->prefixlen == 96)
+ return 0;
+#endif /* MUSICA */
return 1;
+ }
if (type == ZEBRA_ROUTE_KERNEL && IN6_IS_ADDR_UNSPECIFIED (&p->prefix)
&& p->prefixlen == 96 && gate && IN6_IS_ADDR_UNSPECIFIED (gate))
{
diff --git a/zebra/zserv.c b/zebra/zserv.c
index 4753f577..ae1e0445 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -448,6 +448,7 @@ zsend_ipv4_add_multipath (struct zserv *client, struct prefix *p,
{
stream_putc (s, 1);
+ /* XXX: Waht's about NEXTHOP_TYPE_IPV4_IFNAME ? */
if (nexthop->type == NEXTHOP_TYPE_IPV4
|| nexthop->type == NEXTHOP_TYPE_IPV4_IFINDEX)
stream_put_in_addr (s, &nexthop->gate.ipv4);
@@ -529,6 +530,8 @@ zsend_ipv4_delete_multipath (struct zserv *client, struct prefix *p,
return 0;
}
+#if 0
+#warning oldies
int
zsend_ipv4_add (struct zserv *client, int type, int flags,
struct prefix_ipv4 *p, struct in_addr *nexthop,
@@ -610,8 +613,11 @@ zsend_ipv4_delete (struct zserv *client, int type, int flags,
return 0;
}
+#endif /* oldies */
#ifdef HAVE_IPV6
+#if 0
+#warning oldies
int
zsend_ipv6_add (struct zserv *client, int type, int flags,
struct prefix_ipv6 *p, struct in6_addr *nexthop,
@@ -652,6 +658,7 @@ zsend_ipv6_add (struct zserv *client, int type, int flags,
return 0;
}
+#endif /* oldies */
int
zsend_ipv6_add_multipath (struct zserv *client, struct prefix *p,
@@ -687,7 +694,9 @@ zsend_ipv6_add_multipath (struct zserv *client, struct prefix *p,
{
stream_putc (s, 1);
- if (nexthop->type == NEXTHOP_TYPE_IPV6)
+ if (nexthop->type == NEXTHOP_TYPE_IPV6
+ || nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX
+ || nexthop->type == NEXTHOP_TYPE_IPV6_IFNAME)
stream_write (s, (u_char *) &nexthop->gate.ipv6, 16);
else
stream_write (s, (u_char *) &empty, 16);
@@ -711,6 +720,8 @@ zsend_ipv6_add_multipath (struct zserv *client, struct prefix *p,
return 0;
}
+#if 0
+#warning oldies
int
zsend_ipv6_delete (struct zserv *client, int type, int flags,
struct prefix_ipv6 *p, struct in6_addr *nexthop,
@@ -751,6 +762,7 @@ zsend_ipv6_delete (struct zserv *client, int type, int flags,
return 0;
}
+#endif /* oldies */
int
zsend_ipv6_delete_multipath (struct zserv *client, struct prefix *p,
diff --git a/zebra/zserv.h b/zebra/zserv.h
index a083611f..ec3c9f4b 100644
--- a/zebra/zserv.h
+++ b/zebra/zserv.h
@@ -89,6 +89,8 @@ zsend_interface_up (struct zserv *, struct interface *);
int
zsend_interface_down (struct zserv *, struct interface *);
+#if 0
+#warning oldies
int
zsend_ipv4_add (struct zserv *client, int type, int flags,
struct prefix_ipv4 *p, struct in_addr *nexthop,
@@ -98,6 +100,7 @@ int
zsend_ipv4_delete (struct zserv *client, int type, int flags,
struct prefix_ipv4 *p, struct in_addr *nexthop,
unsigned int ifindex);
+#endif
int
zsend_ipv4_add_multipath (struct zserv *, struct prefix *, struct rib *);
@@ -106,6 +109,8 @@ int
zsend_ipv4_delete_multipath (struct zserv *, struct prefix *, struct rib *);
#ifdef HAVE_IPV6
+#if 0
+#warning oldies
int
zsend_ipv6_add (struct zserv *client, int type, int flags,
struct prefix_ipv6 *p, struct in6_addr *nexthop,
@@ -115,6 +120,7 @@ int
zsend_ipv6_delete (struct zserv *client, int type, int flags,
struct prefix_ipv6 *p, struct in6_addr *nexthop,
unsigned int ifindex);
+#endif
int
zsend_ipv6_add_multipath (struct zserv *, struct prefix *, struct rib *);