diff options
Diffstat (limited to 'zebra/ioctl.c')
-rw-r--r-- | zebra/ioctl.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/zebra/ioctl.c b/zebra/ioctl.c index ccb927ac..c9ec8d57 100644 --- a/zebra/ioctl.c +++ b/zebra/ioctl.c @@ -179,7 +179,7 @@ if_unset_prefix (struct interface *ifp, struct connected *ifc) return kernel_address_delete_ipv4 (ifp, ifc); } #else /* ! HAVE_NETLINK */ -#ifdef HAVE_IFALIASREQ +#ifdef HAVE_STRUCT_IFALIASREQ /* Set up interface's IP address, netmask (and broadcas? ). *BSD may has ifaliasreq structure. */ int @@ -199,7 +199,7 @@ if_set_prefix (struct interface *ifp, struct connected *ifc) memset (&addr, 0, sizeof (struct sockaddr_in)); addr.sin_addr = p->prefix; addr.sin_family = p->family; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN addr.sin_len = sizeof (struct sockaddr_in); #endif memcpy (&addreq.ifra_addr, &addr, sizeof (struct sockaddr_in)); @@ -207,7 +207,7 @@ if_set_prefix (struct interface *ifp, struct connected *ifc) memset (&mask, 0, sizeof (struct sockaddr_in)); masklen2ip (p->prefixlen, &mask.sin_addr); mask.sin_family = p->family; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN mask.sin_len = sizeof (struct sockaddr_in); #endif memcpy (&addreq.ifra_mask, &mask, sizeof (struct sockaddr_in)); @@ -237,7 +237,7 @@ if_unset_prefix (struct interface *ifp, struct connected *ifc) memset (&addr, 0, sizeof (struct sockaddr_in)); addr.sin_addr = p->prefix; addr.sin_family = p->family; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN addr.sin_len = sizeof (struct sockaddr_in); #endif memcpy (&addreq.ifra_addr, &addr, sizeof (struct sockaddr_in)); @@ -245,7 +245,7 @@ if_unset_prefix (struct interface *ifp, struct connected *ifc) memset (&mask, 0, sizeof (struct sockaddr_in)); masklen2ip (p->prefixlen, &mask.sin_addr); mask.sin_family = p->family; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN mask.sin_len = sizeof (struct sockaddr_in); #endif memcpy (&addreq.ifra_mask, &mask, sizeof (struct sockaddr_in)); @@ -335,7 +335,7 @@ if_unset_prefix (struct interface *ifp, struct connected *ifc) return 0; } -#endif /* HAVE_IFALIASREQ */ +#endif /* HAVE_STRUCT_IFALIASREQ */ #endif /* HAVE_NETLINK */ /* get interface flags */ @@ -457,7 +457,7 @@ if_prefix_delete_ipv6 (struct interface *ifp, struct connected *ifc) return ret; } #else /* LINUX_IPV6 */ -#ifdef HAVE_IN6_ALIASREQ +#ifdef HAVE_STRUCT_IN6_ALIASREQ #ifndef ND6_INFINITE_LIFETIME #define ND6_INFINITE_LIFETIME 0xffffffffL #endif /* ND6_INFINITE_LIFETIME */ @@ -478,7 +478,7 @@ if_prefix_add_ipv6 (struct interface *ifp, struct connected *ifc) memset (&addr, 0, sizeof (struct sockaddr_in6)); addr.sin6_addr = p->prefix; addr.sin6_family = p->family; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN addr.sin6_len = sizeof (struct sockaddr_in6); #endif memcpy (&addreq.ifra_addr, &addr, sizeof (struct sockaddr_in6)); @@ -486,7 +486,7 @@ if_prefix_add_ipv6 (struct interface *ifp, struct connected *ifc) memset (&mask, 0, sizeof (struct sockaddr_in6)); masklen2ip6 (p->prefixlen, &mask.sin6_addr); mask.sin6_family = p->family; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN mask.sin6_len = sizeof (struct sockaddr_in6); #endif memcpy (&addreq.ifra_prefixmask, &mask, sizeof (struct sockaddr_in6)); @@ -494,7 +494,7 @@ if_prefix_add_ipv6 (struct interface *ifp, struct connected *ifc) addreq.ifra_lifetime.ia6t_vltime = 0xffffffff; addreq.ifra_lifetime.ia6t_pltime = 0xffffffff; -#ifdef HAVE_IFRA_LIFETIME +#ifdef HAVE_STRUCT_IF6_ALIASREQ_IFRA_LIFETIME addreq.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME; addreq.ifra_lifetime.ia6t_vltime = ND6_INFINITE_LIFETIME; #endif @@ -522,7 +522,7 @@ if_prefix_delete_ipv6 (struct interface *ifp, struct connected *ifc) memset (&addr, 0, sizeof (struct sockaddr_in6)); addr.sin6_addr = p->prefix; addr.sin6_family = p->family; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN addr.sin6_len = sizeof (struct sockaddr_in6); #endif memcpy (&addreq.ifra_addr, &addr, sizeof (struct sockaddr_in6)); @@ -530,12 +530,12 @@ if_prefix_delete_ipv6 (struct interface *ifp, struct connected *ifc) memset (&mask, 0, sizeof (struct sockaddr_in6)); masklen2ip6 (p->prefixlen, &mask.sin6_addr); mask.sin6_family = p->family; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN mask.sin6_len = sizeof (struct sockaddr_in6); #endif memcpy (&addreq.ifra_prefixmask, &mask, sizeof (struct sockaddr_in6)); -#ifdef HAVE_IFRA_LIFETIME +#ifdef HAVE_STRUCT_IF6_ALIASREQ_IFRA_LIFETIME addreq.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME; addreq.ifra_lifetime.ia6t_vltime = ND6_INFINITE_LIFETIME; #endif @@ -557,7 +557,7 @@ if_prefix_delete_ipv6 (struct interface *ifp, struct connected *ifc) { return 0; } -#endif /* HAVE_IN6_ALIASREQ */ +#endif /* HAVE_STRUCT_IN6_ALIASREQ */ #endif /* LINUX_IPV6 */ |