switch (family) {
case AF_INET:
uchar_to_inaddr(&api_nh->gate.ipv4, gate);
- if (IPV4_ADDR_SAME (&api_nh->gate.ipv4, &quagga_prefix.u.prefix4) &&
- quagga_prefix.prefixlen == 32) {
- api_nh->type = NEXTHOP_TYPE_IFINDEX;
- } else {
- api_nh->type = NEXTHOP_TYPE_IPV4_IFINDEX;
+ if (IPV4_ADDR_SAME(&api_nh->gate.ipv4, &quagga_prefix.u.prefix4)
+ && quagga_prefix.prefixlen == IPV4_MAX_BITLEN) {
+ api_nh->type = NEXTHOP_TYPE_IFINDEX;
+ } else {
+ api_nh->type = NEXTHOP_TYPE_IPV4_IFINDEX;
}
break;
case AF_INET6:
/* Like gettimeofday, but returns monotonic time. If POSIX clocks are not
available, falls back to gettimeofday but enforces monotonicity. */
-int
+void
gettime(struct timeval *tv)
{
- return monotime(tv);
+ monotime(tv);
}
/* If /dev/urandom doesn't exist, this will fail with ENOENT, which the