Update of /cvsroot/leaf/src/bering-uclibc/apps/busybox
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv20297
Modified Files:
buildtool.cfg buildtool.mk
Added Files:
bb_prefer_ipv4.patch busybox-1.8.2.tar.bz2
Log Message:
new upstream version 1.8.2
patch to fix "ping: can't create raw socket: Address family not supported by
protocol" whilst trying to ping/connect to a
host from /etc/hosts and ipv6 is not loaded.
--- NEW FILE: busybox-1.8.2.tar.bz2 ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: bb_prefer_ipv4.patch ---
diff -d -urpN busybox.0/libbb/xconnect.c busybox.1/libbb/xconnect.c
--- busybox.0/libbb/xconnect.c 2007-11-13 11:13:34.000000000 -0700
+++ busybox.1/libbb/xconnect.c 2007-11-14 03:03:46.000000000 -0700
@@ -125,6 +125,7 @@ USE_FEATURE_IPV6(sa_family_t af,)
int rc;
len_and_sockaddr *r = NULL;
struct addrinfo *result = NULL;
+ struct addrinfo *used_res;
const char *org_host = host; /* only for error msg */
const char *cp;
struct addrinfo hint;
@@ -169,9 +170,21 @@ USE_FEATURE_IPV6(sa_family_t af,)
xfunc_die();
goto ret;
}
- r = xmalloc(offsetof(len_and_sockaddr, sa) + result->ai_addrlen);
- r->len = result->ai_addrlen;
- memcpy(&r->sa, result->ai_addr, result->ai_addrlen);
+ used_res = result;
+#if ENABLE_FEATURE_PREFER_IPV4_ADDRESS
+ while (1) {
+ if (used_res->ai_family == AF_INET)
+ break;
+ used_res = used_res->ai_next;
+ if (!used_res) {
+ used_res = result;
+ break;
+ }
+ }
+#endif
+ r = xmalloc(offsetof(len_and_sockaddr, sa) + used_res->ai_addrlen);
+ r->len = used_res->ai_addrlen;
+ memcpy(&r->sa, used_res->ai_addr, used_res->ai_addrlen);
set_nport(r, htons(port));
ret:
freeaddrinfo(result);
diff -d -urpN busybox.0/networking/Config.in busybox.1/networking/Config.in
--- busybox.0/networking/Config.in 2007-11-13 11:13:29.000000000 -0700
+++ busybox.1/networking/Config.in 2007-11-14 03:05:27.000000000 -0700
@@ -12,6 +12,21 @@ config FEATURE_IPV6
Enable IPv6 support in busybox.
This adds IPv6 support in the networking applets.
+config FEATURE_PREFER_IPV4_ADDRESS
+ bool "Preferentially use IPv4 addresses from DNS queries"
+ default y
+ depends on FEATURE_IPV6
+ help
+ Use IPv4 address of network host if it has one.
+
+ If this option is off, the first returned address will be used.
+ This may cause problems when your DNS server is IPv6-capable and
+ is returning IPv6 host addresses too. If IPv6 address
+ precedes IPv4 one in DNS reply, busybox network applets
+ (e.g. wget) will use IPv6 address. On an IPv6-incapable host
+ or network applets will fail to connect to the host
+ using IPv6 address.
+
config VERBOSE_RESOLUTION_ERRORS
bool "Verbose resolution errors"
default n
Index: buildtool.cfg
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc/apps/busybox/buildtool.cfg,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** buildtool.cfg 11 Nov 2007 10:19:41 -0000 1.22
--- buildtool.cfg 12 Dec 2007 14:47:47 -0000 1.23
***************
*** 5,9 ****
</File>
! <File busybox-1.7.3.tar.bz2>
Server = cvs-sourceforge
envname = BUSYBOX_SOURCE
--- 5,9 ----
</File>
! <File busybox-1.8.2.tar.bz2>
Server = cvs-sourceforge
envname = BUSYBOX_SOURCE
***************
*** 33,36 ****
--- 33,45 ----
</File>
+ <File bb_prefer_ipv4.patch>
+ Server = cvs-sourceforge
+ envname = BUSYBOX_PATCH4
+ directory = busybox
+ revision = HEAD
+ </File>
+
+
+
<File .config>
Server = cvs-sourceforge
Index: buildtool.mk
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc/apps/busybox/buildtool.mk,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** buildtool.mk 11 Nov 2007 10:19:41 -0000 1.23
--- buildtool.mk 12 Dec 2007 14:47:47 -0000 1.24
***************
*** 8,12 ****
include $(MASTERMAKEFILE)
! BUSYBOX_DIR=busybox-1.7.3
BUSYBOX_BUILD_DIR=$(BT_BUILD_DIR)/busybox
--- 8,12 ----
include $(MASTERMAKEFILE)
! BUSYBOX_DIR=busybox-1.8.2
BUSYBOX_BUILD_DIR=$(BT_BUILD_DIR)/busybox
***************
*** 19,22 ****
--- 19,23 ----
cat $(BUSYBOX_PATCH2) | patch -d $(BUSYBOX_DIR) -p1
cat $(BUSYBOX_PATCH3) | patch -d $(BUSYBOX_DIR) -p1
+ cat $(BUSYBOX_PATCH4) | patch -d $(BUSYBOX_DIR) -p1
touch $(BUSYBOX_DIR)/.source
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
leaf-cvs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/leaf-cvs-commits