kernel-netlink: Fix compilation on old kernels not defining IFA_F_NODAD
authorTobias Brunner <tobias@strongswan.org>
Mon, 11 Dec 2017 09:35:30 +0000 (10:35 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 22 Dec 2017 09:28:05 +0000 (10:28 +0100)
Fixes #2490.

src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c

index a21d0ae..e4ded32 100644 (file)
@@ -2333,7 +2333,9 @@ static status_t manage_ipaddr(private_kernel_netlink_net_t *this, int nlmsg_type
 
        if (ip->get_family(ip) == AF_INET6)
        {
+#ifdef IFA_F_NODAD
                msg->ifa_flags |= IFA_F_NODAD;
+#endif
                if (this->rta_prefsrc_for_ipv6)
                {
                        /* if source routes are possible we let the virtual IP get