kernel-netlink: Cast IPv6 address blobs to the proper type
authorTobias Brunner <tobias@strongswan.org>
Tue, 24 Jun 2014 13:43:49 +0000 (15:43 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 24 Jun 2014 13:53:25 +0000 (15:53 +0200)
On Android these macros are defined as functions.

src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c

index 650a655..82b637d 100644 (file)
@@ -685,15 +685,15 @@ static u_char get_scope(host_t *ip)
                        }
                        break;
                case 16:
-                       if (IN6_IS_ADDR_LOOPBACK(addr.ptr))
+                       if (IN6_IS_ADDR_LOOPBACK((struct in6_addr*)addr.ptr))
                        {       /* link-local, according to RFC 4291, 2.5.3 */
                                return 2;
                        }
-                       if (IN6_IS_ADDR_LINKLOCAL(addr.ptr))
+                       if (IN6_IS_ADDR_LINKLOCAL((struct in6_addr*)addr.ptr))
                        {
                                return 2;
                        }
-                       if (IN6_IS_ADDR_SITELOCAL(addr.ptr))
+                       if (IN6_IS_ADDR_SITELOCAL((struct in6_addr*)addr.ptr))
                        {       /* deprecated, according to RFC 4291, 2.5.7 */
                                return 5;
                        }