Commit 55bab4f6 authored by Gustavo Zacarias's avatar Gustavo Zacarias Committed by Thomas Petazzoni
Browse files

packages: remove non-IPv6 enabler patches



These are no longer required so remove them.

Signed-off-by: default avatarGustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent 308ca05f
Loading
Loading
Loading
Loading

package/avahi/0003-ipv6only.patch

deleted100644 → 0
+0 −19
Original line number Diff line number Diff line
diff -urpN avahi-0.6.22.orig/avahi-core/socket.c avahi-0.6.22/avahi-core/socket.c
--- avahi-0.6.22.orig/avahi-core/socket.c	2007-12-16 22:03:08.000000000 +0100
+++ avahi-0.6.22/avahi-core/socket.c	2008-03-31 17:13:24.000000000 +0200
@@ -394,13 +394,13 @@ int avahi_open_socket_ipv6(int no_reuse)
         avahi_log_warn("IPV6_UNICAST_HOPS failed: %s", strerror(errno));
         goto fail;
     }
-
+#ifdef IPV6_V6ONLY
     yes = 1;
     if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &yes, sizeof(yes)) < 0) {
         avahi_log_warn("IPV6_V6ONLY failed: %s", strerror(errno));
         goto fail;
     }
-
+#endif
     yes = 1;
     if (setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, &yes, sizeof(yes)) < 0) {
         avahi_log_warn("IPV6_MULTICAST_LOOP failed: %s", strerror(errno));
+0 −147
Original line number Diff line number Diff line
[PATCH] avahi-core: make ipv6 support optional on uclibc 0.9.31+

uClibc 0.9.31+ doesn't define the IPV6_* defines when IPv6 support isn't
enabled, causing the avahi build to break. Detect this configuration, and
comment out IPv6 code if so.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 avahi-core/socket.c |   28 +++++++++++++++++++++++-----
 1 file changed, 23 insertions(+), 5 deletions(-)

Index: avahi-0.6.23/avahi-core/socket.c
===================================================================
--- avahi-0.6.23.orig/avahi-core/socket.c
+++ avahi-0.6.23/avahi-core/socket.c
@@ -47,6 +47,11 @@
 #include <net/if_dl.h>
 #endif
 
+#include <features.h>
+#if defined(__UCLIBC__) && !defined (__UCLIBC_HAS_IPV6__)
+#define NO_IPV6
+#endif
+
 #include "dns.h"
 #include "fdutil.h"
 #include "socket.h"
@@ -75,6 +80,7 @@ static void mdns_mcast_group_ipv4(struct
     inet_pton(AF_INET, AVAHI_IPV4_MCAST_GROUP, &ret_sa->sin_addr);
 }
 
+#ifndef NO_IPV6
 static void mdns_mcast_group_ipv6(struct sockaddr_in6 *ret_sa) {
     assert(ret_sa);
 
@@ -83,6 +89,7 @@ static void mdns_mcast_group_ipv6(struct
     ret_sa->sin6_port = htons(AVAHI_MDNS_PORT);
     inet_pton(AF_INET6, AVAHI_IPV6_MCAST_GROUP, &ret_sa->sin6_addr);
 }
+#endif
 
 static void ipv4_address_to_sockaddr(struct sockaddr_in *ret_sa, const AvahiIPv4Address *a, uint16_t port) {
     assert(ret_sa);
@@ -95,6 +102,7 @@ static void ipv4_address_to_sockaddr(str
     memcpy(&ret_sa->sin_addr, a, sizeof(AvahiIPv4Address));
 }
 
+#ifndef NO_IPV6
 static void ipv6_address_to_sockaddr(struct sockaddr_in6 *ret_sa, const AvahiIPv6Address *a, uint16_t port) {
     assert(ret_sa);
     assert(a);
@@ -105,6 +113,7 @@ static void ipv6_address_to_sockaddr(str
     ret_sa->sin6_port = htons(port);
     memcpy(&ret_sa->sin6_addr, a, sizeof(AvahiIPv6Address));
 }
+#endif
 
 int avahi_mdns_mcast_join_ipv4(int fd, const AvahiIPv4Address *a, int idx, int join) {
 #ifdef HAVE_STRUCT_IP_MREQN
@@ -143,6 +152,7 @@ int avahi_mdns_mcast_join_ipv4(int fd, c
 }
 
 int avahi_mdns_mcast_join_ipv6(int fd, const AvahiIPv6Address *a, int idx, int join) {
+#ifndef NO_IPV6
     struct ipv6_mreq mreq6;
     struct sockaddr_in6 sa6;
 
@@ -164,6 +174,9 @@ int avahi_mdns_mcast_join_ipv6(int fd, c
     }
 
     return 0;
+#else
+    return -1;
+#endif
 }
 
 static int reuseaddr(int fd) {
@@ -372,6 +385,7 @@ fail:
 }
 
 int avahi_open_socket_ipv6(int no_reuse) {
+#ifndef NO_IPV6
     struct sockaddr_in6 sa, local;
     int fd = -1, yes, r;
     int ttl;
@@ -437,7 +451,7 @@ int avahi_open_socket_ipv6(int no_reuse)
 fail:
     if (fd >= 0)
         close(fd);
-
+#endif
     return -1;
 }
 
@@ -567,7 +581,7 @@ int avahi_send_dns_packet_ipv6(
         const AvahiIPv6Address *src_address,
         const AvahiIPv6Address *dst_address,
         uint16_t dst_port) {
-
+#ifndef NO_IPV6
     struct sockaddr_in6 sa;
     struct msghdr msg;
     struct iovec io;
@@ -620,6 +634,9 @@ int avahi_send_dns_packet_ipv6(
     }
 
     return sendmsg_loop(fd, &msg, 0);
+#else
+    return -1;
+#endif
 }
 
 AvahiDnsPacket *avahi_recv_dns_packet_ipv4(
@@ -782,7 +799,7 @@ AvahiDnsPacket *avahi_recv_dns_packet_ip
         AvahiIPv6Address *ret_dst_address,
         AvahiIfIndex *ret_iface,
         uint8_t *ret_ttl) {
-
+#ifndef NO_IPV6
     AvahiDnsPacket *p = NULL;
     struct msghdr msg;
     struct iovec io;
@@ -889,7 +906,7 @@ AvahiDnsPacket *avahi_recv_dns_packet_ip
 fail:
     if (p)
         avahi_dns_packet_free(p);
-
+#endif
     return NULL;
 }
 
@@ -934,6 +951,7 @@ fail:
 }
 
 int avahi_open_unicast_socket_ipv6(void) {
+#ifndef NO_IPV6
     struct sockaddr_in6 local;
     int fd = -1, yes;
 
@@ -974,6 +992,6 @@ int avahi_open_unicast_socket_ipv6(void)
 fail:
     if (fd >= 0)
         close(fd);
-
+#endif
     return -1;
 }
+0 −89
Original line number Diff line number Diff line
[PATCH] fix build on uClibc without IPv6 support

Disable IPv6 support code when building with uClibc configured without IPv6
support.

[Gustavo: update for iproute2 3.10.0]
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

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
@@ -20,6 +20,10 @@
  *	Masahide NAKAMURA @USAGI
  */

+#include <features.h>
+#if defined(__UCLIBC__) && !defined (__UCLIBC_HAS_IPV6__)
+#else
+
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
@@ -425,3 +429,5 @@
 	fprintf(stderr, "Command \"%s\" is unknown, try \"ip -f inet6 tunnel help\".\n", *argv);
 	exit(-1);
 }
+
+#endif /* no ipv6 */
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 @@
  *	Masahide NAKAMURA @USAGI
  */

+#include <features.h>
+#if defined(__UCLIBC__) && !defined (__UCLIBC_HAS_IPV6__)
+#define NO_IPV6
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <sys/socket.h>
+#ifndef NO_IPV6
 #include <netinet/icmp6.h>
+#endif

 #include "utils.h"
 #include "ip_common.h"
@@ -65,10 +72,12 @@
 		fprintf(stderr, "incorrect protocol family: %d\n", prefix->prefix_family);
 		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

 	parse_rtattr(tb, RTA_MAX, RTM_RTA(prefix), len);

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
@@ -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

 #include <stdio.h>
 #include <stdlib.h>
@@ -634,8 +638,10 @@
 	 * protocol-independent because of unarranged structure between
 	 * IPv4 and IPv6.
 	 */
+#ifndef NO_IPV6
 	case AF_INET6:
 		return do_ip6tunnel(argc, argv);
+#endif
 	default:
 		fprintf(stderr, "Unsupported protocol family: %d\n", preferred_family);
 		exit(-1);
+0 −83
Original line number Diff line number Diff line
Disable IPv6 support code in vxlan when building with uClibc configured without
IPv6 support.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

diff -Nura iproute2-3.14.0/ip/iplink_vxlan.c iproute2-3.14.0-noipv6/ip/iplink_vxlan.c
--- iproute2-3.14.0/ip/iplink_vxlan.c	2014-04-11 21:48:41.000000000 -0300
+++ iproute2-3.14.0-noipv6/ip/iplink_vxlan.c	2014-04-14 08:36:22.638235721 -0300
@@ -9,6 +9,11 @@
  * Authors:     Stephen Hemminger <shemminger@vyatta.com
  */
 
+#include <features.h>
+#if defined(__UCLIBC__) && !defined (__UCLIBC_HAS_IPV6__)
+#define NO_IPV6
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -188,12 +193,14 @@
 		return -1;
 	}
 
+#ifndef NO_IPV6
 	if ((gaddr && daddr) ||
 		(memcmp(&gaddr6, &in6addr_any, sizeof(gaddr6)) &&
 		 memcmp(&daddr6, &in6addr_any, sizeof(daddr6)))) {
 		fprintf(stderr, "vxlan: both group and remote cannot be specified\n");
 		return -1;
 	}
+#endif
 
 	if (!dst_port_set) {
 		fprintf(stderr, "vxlan: destination port not specified\n"
@@ -208,15 +215,19 @@
 		addattr_l(n, 1024, IFLA_VXLAN_GROUP, &gaddr, 4);
 	else if (daddr)
 		addattr_l(n, 1024, IFLA_VXLAN_GROUP, &daddr, 4);
+#ifndef NO_IPV6
 	if (memcmp(&gaddr6, &in6addr_any, sizeof(gaddr6)) != 0)
 		addattr_l(n, 1024, IFLA_VXLAN_GROUP6, &gaddr6, sizeof(struct in6_addr));
 	else if (memcmp(&daddr6, &in6addr_any, sizeof(daddr6)) != 0)
 		addattr_l(n, 1024, IFLA_VXLAN_GROUP6, &daddr6, sizeof(struct in6_addr));
+#endif
 
 	if (saddr)
 		addattr_l(n, 1024, IFLA_VXLAN_LOCAL, &saddr, 4);
+#ifndef NO_IPV6
 	else if (memcmp(&saddr6, &in6addr_any, sizeof(saddr6)) != 0)
 		addattr_l(n, 1024, IFLA_VXLAN_LOCAL6, &saddr6, sizeof(struct in6_addr));
+#endif
 
 	if (link)
 		addattr32(n, 1024, IFLA_VXLAN_LINK, link);
@@ -275,6 +286,7 @@
 	} else if (tb[IFLA_VXLAN_GROUP6]) {
 		struct in6_addr addr;
 		memcpy(&addr, RTA_DATA(tb[IFLA_VXLAN_GROUP6]), sizeof(struct in6_addr));
+#ifndef NO_IPV6
 		if (memcmp(&addr, &in6addr_any, sizeof(addr)) != 0) {
 			if (IN6_IS_ADDR_MULTICAST(&addr))
 				fprintf(f, "group %s ",
@@ -283,6 +295,7 @@
 				fprintf(f, "remote %s ",
 					format_host(AF_INET6, sizeof(struct in6_addr), &addr, s1, sizeof(s1)));
 		}
+#endif
 	}
 
 	if (tb[IFLA_VXLAN_LOCAL]) {
@@ -293,9 +306,11 @@
 	} else if (tb[IFLA_VXLAN_LOCAL6]) {
 		struct in6_addr addr;
 		memcpy(&addr, RTA_DATA(tb[IFLA_VXLAN_LOCAL6]), sizeof(struct in6_addr));
+#ifndef NO_IPV6
 		if (memcmp(&addr, &in6addr_any, sizeof(addr)) != 0)
 			fprintf(f, "local %s ",
 				format_host(AF_INET6, sizeof(struct in6_addr), &addr, s1, sizeof(s1)));
+#endif
 	}
 
 	if (tb[IFLA_VXLAN_LINK] &&
+0 −22
Original line number Diff line number Diff line
[PATCH] Fix build on systems without IPV6_TCLASS support

The wrong variable name was used.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 src/eXtl_udp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: libeXosip2-3.6.0/src/eXtl_udp.c
===================================================================
--- libeXosip2-3.6.0.orig/src/eXtl_udp.c
+++ libeXosip2-3.6.0/src/eXtl_udp.c
@@ -178,7 +178,7 @@
 		res = setsockopt(udp_socket, IPPROTO_IPV6, IPV6_TCLASS,
 			(SOCKET_OPTION_VALUE)&tos, sizeof(tos));
 #else
-		retval = setsockopt(udp_socket, IPPROTO_IPV6, IP_TOS,
+		res = setsockopt(udp_socket, IPPROTO_IPV6, IP_TOS,
 			(SOCKET_OPTION_VALUE)&tos, sizeof(tos));
 #endif
 	}
Loading