2011-01-30 01:37:24 +01:00
|
|
|
[PATCH] fix build on uClibc without IPv6 support
|
|
|
|
|
|
|
|
Disable IPv6 support code when building with uClibc configured without IPv6
|
|
|
|
support.
|
|
|
|
|
2013-08-30 23:57:19 +02:00
|
|
|
[Gustavo: update for iproute2 3.10.0]
|
2011-01-30 01:37:24 +01:00
|
|
|
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
|
2013-08-30 23:57:19 +02:00
|
|
|
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
2011-01-30 01:37:24 +01:00
|
|
|
|
2013-08-30 23:57:19 +02:00
|
|
|
diff -Nura iproute2-3.10.0.orig/ip/ip6tunnel.c iproute2-3.10.0/ip/ip6tunnel.c
|
|
|
|
--- iproute2-3.10.0.orig/ip/ip6tunnel.c 2013-08-14 09:17:56.538089916 -0300
|
|
|
|
+++ iproute2-3.10.0/ip/ip6tunnel.c 2013-08-14 09:18:02.952298534 -0300
|
2011-01-30 01:37:24 +01:00
|
|
|
@@ -20,6 +20,10 @@
|
|
|
|
* Masahide NAKAMURA @USAGI
|
|
|
|
*/
|
2013-08-30 23:57:19 +02:00
|
|
|
|
2011-01-30 01:37:24 +01:00
|
|
|
+#include <features.h>
|
|
|
|
+#if defined(__UCLIBC__) && !defined (__UCLIBC_HAS_IPV6__)
|
|
|
|
+#else
|
|
|
|
+
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdlib.h>
|
2013-08-30 23:57:19 +02:00
|
|
|
@@ -425,3 +429,5 @@
|
2011-01-30 01:37:24 +01:00
|
|
|
fprintf(stderr, "Command \"%s\" is unknown, try \"ip -f inet6 tunnel help\".\n", *argv);
|
|
|
|
exit(-1);
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+#endif /* no ipv6 */
|
2013-08-30 23:57:19 +02:00
|
|
|
diff -Nura iproute2-3.10.0.orig/ip/ipprefix.c iproute2-3.10.0/ip/ipprefix.c
|
|
|
|
--- iproute2-3.10.0.orig/ip/ipprefix.c 2013-08-14 09:17:56.539089949 -0300
|
|
|
|
+++ iproute2-3.10.0/ip/ipprefix.c 2013-08-14 09:19:29.065099291 -0300
|
|
|
|
@@ -23,11 +23,18 @@
|
2011-01-30 01:37:24 +01:00
|
|
|
* Masahide NAKAMURA @USAGI
|
|
|
|
*/
|
2013-08-30 23:57:19 +02:00
|
|
|
|
2011-01-30 01:37:24 +01:00
|
|
|
+#include <features.h>
|
|
|
|
+#if defined(__UCLIBC__) && !defined (__UCLIBC_HAS_IPV6__)
|
|
|
|
+#define NO_IPV6
|
|
|
|
+#endif
|
2013-08-30 23:57:19 +02:00
|
|
|
+
|
2011-01-30 01:37:24 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2013-08-30 23:57:19 +02:00
|
|
|
#include <sys/socket.h>
|
2011-01-30 01:37:24 +01:00
|
|
|
+#ifndef NO_IPV6
|
|
|
|
#include <netinet/icmp6.h>
|
|
|
|
+#endif
|
2013-08-30 23:57:19 +02:00
|
|
|
|
2011-01-30 01:37:24 +01:00
|
|
|
#include "utils.h"
|
2013-08-30 23:57:19 +02:00
|
|
|
#include "ip_common.h"
|
|
|
|
@@ -65,10 +72,12 @@
|
|
|
|
fprintf(stderr, "incorrect protocol family: %d\n", prefix->prefix_family);
|
2011-01-30 01:37:24 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
+#ifdef ND_OPT_PREFIX_INFORMATION
|
|
|
|
if (prefix->prefix_type != ND_OPT_PREFIX_INFORMATION) {
|
|
|
|
fprintf(stderr, "wrong ND type %d\n", prefix->prefix_type);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
+#endif
|
2013-08-30 23:57:19 +02:00
|
|
|
|
2011-01-30 01:37:24 +01:00
|
|
|
parse_rtattr(tb, RTA_MAX, RTM_RTA(prefix), len);
|
2013-08-30 23:57:19 +02:00
|
|
|
|
|
|
|
diff -Nura iproute2-3.10.0.orig/ip/iptunnel.c iproute2-3.10.0/ip/iptunnel.c
|
|
|
|
--- iproute2-3.10.0.orig/ip/iptunnel.c 2013-08-14 09:17:56.538089916 -0300
|
|
|
|
+++ iproute2-3.10.0/ip/iptunnel.c 2013-08-14 09:18:02.953298566 -0300
|
2011-01-30 01:37:24 +01:00
|
|
|
@@ -9,6 +9,10 @@
|
|
|
|
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
+#include <features.h>
|
|
|
|
+#if defined(__UCLIBC__) && !defined (__UCLIBC_HAS_IPV6__)
|
|
|
|
+#define NO_IPV6
|
|
|
|
+#endif
|
2013-08-30 23:57:19 +02:00
|
|
|
|
2011-01-30 01:37:24 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2013-08-30 23:57:19 +02:00
|
|
|
@@ -634,8 +638,10 @@
|
2011-01-30 01:37:24 +01:00
|
|
|
* protocol-independent because of unarranged structure between
|
|
|
|
* IPv4 and IPv6.
|
|
|
|
*/
|
|
|
|
+#ifndef NO_IPV6
|
|
|
|
case AF_INET6:
|
|
|
|
return do_ip6tunnel(argc, argv);
|
|
|
|
+#endif
|
|
|
|
default:
|
2013-08-30 23:57:19 +02:00
|
|
|
fprintf(stderr, "Unsupported protocol family: %d\n", preferred_family);
|
2011-01-30 01:37:24 +01:00
|
|
|
exit(-1);
|