summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2014-08-06 13:23:12 +0200
committerSteven Barth <steven@midlink.org>2014-08-06 13:23:12 +0200
commit77a865b5b3ac476e05ff80f3c10d86686285c0da (patch)
treec740ddd640d9d0b40a4e6d14bbaf70dfbc680c8b
parenta6f28311d3786cbd5307aee3239032f6db1503f3 (diff)
Disable new-style tunnel creation for older kernels
Signed-off-by: Steven Barth <steven@midlink.org>
-rw-r--r--system-linux.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/system-linux.c b/system-linux.c
index 2d65cef..2a281cc 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -1654,6 +1654,7 @@ static int tunnel_ioctl(const char *name, int cmd, void *p)
return ioctl(sock_ioctl, cmd, &ifr);
}
+#ifdef IFLA_IPTUN_MAX
static int system_add_gre_tunnel(const char *name, const char *kind,
const unsigned int link, struct blob_attr **tb, bool v6)
{
@@ -1796,6 +1797,7 @@ failure:
nlmsg_free(nlm);
return ret;
}
+#endif
static int __system_del_ip_tunnel(const char *name, struct blob_attr **tb)
{
@@ -1935,6 +1937,7 @@ int system_add_ip_tunnel(const char *name, struct blob_attr *attr)
}
}
#endif
+#ifdef IFLA_IPTUN_MAX
} else if (!strcmp(str, "ipip6")) {
struct nl_msg *nlm = nlmsg_alloc_simple(RTM_NEWLINK,
NLM_F_REQUEST | NLM_F_REPLACE | NLM_F_CREATE);
@@ -2045,6 +2048,7 @@ failure:
return system_add_gre_tunnel(name, "ip6gre", link, tb, true);
} else if (!strcmp(str, "gretapip6")) {
return system_add_gre_tunnel(name, "ip6gretap", link, tb, true);
+#endif
}
else
return -EINVAL;