aboutsummaryrefslogtreecommitdiffstats
path: root/package/busybox/patches
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2011-04-03 18:31:00 +0000
committerFlorian Fainelli <florian@openwrt.org>2011-04-03 18:31:00 +0000
commit03e30ae13f122c6606d8c63dbf0e49a5f4a8dc79 (patch)
tree138dd3337ab4da580067379a45074ea7e7cf7b11 /package/busybox/patches
parent1bda5f253040898869baba09a04008ef51009cca (diff)
downloadupstream-03e30ae13f122c6606d8c63dbf0e49a5f4a8dc79.tar.gz
upstream-03e30ae13f122c6606d8c63dbf0e49a5f4a8dc79.tar.bz2
upstream-03e30ae13f122c6606d8c63dbf0e49a5f4a8dc79.zip
update busybox to 1.18.4, patch from Peter Wagner
SVN-Revision: 26455
Diffstat (limited to 'package/busybox/patches')
-rw-r--r--package/busybox/patches/000-autoconf.patch11
-rw-r--r--package/busybox/patches/000-upstream-sort.patch12
-rw-r--r--package/busybox/patches/241-udhcpc-oversized_packets.patch22
-rw-r--r--package/busybox/patches/244-udhcpc_add_6rd_option.patch42
-rw-r--r--package/busybox/patches/245-udhcpc_add_msroutes_option.patch22
-rw-r--r--package/busybox/patches/300-netmsg.patch49
-rw-r--r--package/busybox/patches/610-syslog-remote-retry-connection.patch39
-rw-r--r--package/busybox/patches/920-macosx-endian.patch35
8 files changed, 66 insertions, 166 deletions
diff --git a/package/busybox/patches/000-autoconf.patch b/package/busybox/patches/000-autoconf.patch
deleted file mode 100644
index d237457348..0000000000
--- a/package/busybox/patches/000-autoconf.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/applets/Kbuild.src
-+++ b/applets/Kbuild.src
-@@ -28,7 +28,7 @@ HOSTCFLAGS_usage_pod.o = -I$(srctree_sla
- applets/applets.o: include/usage_compressed.h include/applet_tables.h
-
- applets/applet_tables: .config include/applets.h
--applets/usage: .config include/applets.h
-+applets/usage: .config include/applets.h include/autoconf.h
- applets/usage_pod: .config include/applet_tables.h include/applets.h
-
- quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h
diff --git a/package/busybox/patches/000-upstream-sort.patch b/package/busybox/patches/000-upstream-sort.patch
deleted file mode 100644
index ebc9bf9f94..0000000000
--- a/package/busybox/patches/000-upstream-sort.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urpN busybox-1.17.3/coreutils/sort.c busybox-1.17.3-sort/coreutils/sort.c
---- busybox-1.17.3/coreutils/sort.c 2010-10-09 21:57:13.000000000 +0200
-+++ busybox-1.17.3-sort/coreutils/sort.c 2010-10-20 15:17:35.320293543 +0200
-@@ -412,7 +412,7 @@ int sort_main(int argc UNUSED_PARAM, cha
- #if ENABLE_FEATURE_SORT_BIG
- /* Open output file _after_ we read all input ones */
- if (option_mask32 & FLAG_o)
-- xmove_fd(xopen3(str_o, O_WRONLY, 0666), STDOUT_FILENO);
-+ xmove_fd(xopen3(str_o, O_WRONLY|O_CREAT|O_TRUNC, 0666), STDOUT_FILENO);
- #endif
- flag = (option_mask32 & FLAG_z) ? '\0' : '\n';
- for (i = 0; i < linecount; i++)
diff --git a/package/busybox/patches/241-udhcpc-oversized_packets.patch b/package/busybox/patches/241-udhcpc-oversized_packets.patch
index ef9e7f4be1..d83bf0b413 100644
--- a/package/busybox/patches/241-udhcpc-oversized_packets.patch
+++ b/package/busybox/patches/241-udhcpc-oversized_packets.patch
@@ -1,6 +1,8 @@
+diff --git a/networking/udhcp/packet.c b/networking/udhcp/packet.c
+index 2b7528c..94e53dc 100644
--- a/networking/udhcp/packet.c
+++ b/networking/udhcp/packet.c
-@@ -165,6 +165,11 @@ uint16_t FAST_FUNC udhcp_checksum(void *
+@@ -165,6 +165,11 @@ uint16_t FAST_FUNC udhcp_checksum(void *addr, int count)
return ~sum;
}
@@ -12,7 +14,7 @@
/* Construct a ip/udp header for a packet, send packet */
int FAST_FUNC udhcp_send_raw_packet(struct dhcp_packet *dhcp_pkt,
uint32_t source_nip, int source_port,
-@@ -173,10 +178,10 @@ int FAST_FUNC udhcp_send_raw_packet(stru
+@@ -173,10 +178,10 @@ int FAST_FUNC udhcp_send_raw_packet(struct dhcp_packet *dhcp_pkt,
{
struct sockaddr_ll dest_sll;
struct ip_udp_dhcp_packet packet;
@@ -24,7 +26,7 @@
fd = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP));
if (fd < 0) {
-@@ -185,8 +190,8 @@ int FAST_FUNC udhcp_send_raw_packet(stru
+@@ -185,8 +190,8 @@ int FAST_FUNC udhcp_send_raw_packet(struct dhcp_packet *dhcp_pkt,
}
memset(&dest_sll, 0, sizeof(dest_sll));
@@ -35,7 +37,7 @@
dest_sll.sll_family = AF_PACKET;
dest_sll.sll_protocol = htons(ETH_P_IP);
-@@ -199,36 +204,24 @@ int FAST_FUNC udhcp_send_raw_packet(stru
+@@ -199,36 +204,24 @@ int FAST_FUNC udhcp_send_raw_packet(struct dhcp_packet *dhcp_pkt,
goto ret_close;
}
@@ -56,14 +58,14 @@
packet.udp.source = htons(source_port);
packet.udp.dest = htons(dest_port);
- /* size, excluding IP header: */
-- packet.udp.len = htons(UPD_DHCP_SIZE - padding);
+- packet.udp.len = htons(UDP_DHCP_SIZE - padding);
- /* for UDP checksumming, ip.len is set to UDP packet len */
+ p_len += sizeof(packet.udp);
+ packet.udp.len = htons(p_len);
packet.ip.tot_len = packet.udp.len;
-- packet.udp.check = udhcp_checksum(&packet, IP_UPD_DHCP_SIZE - padding);
+- packet.udp.check = udhcp_checksum(&packet, IP_UDP_DHCP_SIZE - padding);
- /* but for sending, it is set to IP packet len */
-- packet.ip.tot_len = htons(IP_UPD_DHCP_SIZE - padding);
+- packet.ip.tot_len = htons(IP_UDP_DHCP_SIZE - padding);
+ p_len += sizeof(packet.ip);
+ packet.udp.check = udhcp_checksum(&packet, p_len);
+ packet.ip.tot_len = htons(p_len);
@@ -73,12 +75,12 @@
packet.ip.check = udhcp_checksum(&packet.ip, sizeof(packet.ip));
udhcp_dump_packet(dhcp_pkt);
-- result = sendto(fd, &packet, IP_UPD_DHCP_SIZE - padding, /*flags:*/ 0,
+- result = sendto(fd, &packet, IP_UDP_DHCP_SIZE - padding, /*flags:*/ 0,
+ result = sendto(fd, &packet, p_len, /*flags:*/ 0,
(struct sockaddr *) &dest_sll, sizeof(dest_sll));
msg = "sendto";
ret_close:
-@@ -246,7 +239,6 @@ int FAST_FUNC udhcp_send_kernel_packet(s
+@@ -246,7 +239,6 @@ int FAST_FUNC udhcp_send_kernel_packet(struct dhcp_packet *dhcp_pkt,
uint32_t dest_nip, int dest_port)
{
struct sockaddr_in client;
@@ -86,7 +88,7 @@
int fd;
int result = -1;
const char *msg;
-@@ -277,9 +269,7 @@ int FAST_FUNC udhcp_send_kernel_packet(s
+@@ -277,9 +269,7 @@ int FAST_FUNC udhcp_send_kernel_packet(struct dhcp_packet *dhcp_pkt,
}
udhcp_dump_packet(dhcp_pkt);
diff --git a/package/busybox/patches/244-udhcpc_add_6rd_option.patch b/package/busybox/patches/244-udhcpc_add_6rd_option.patch
index 0bf6ff0f4b..18a5996408 100644
--- a/package/busybox/patches/244-udhcpc_add_6rd_option.patch
+++ b/package/busybox/patches/244-udhcpc_add_6rd_option.patch
@@ -1,24 +1,26 @@
+diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c
+index 0a60261..eaf2b4b 100644
--- a/networking/udhcp/common.c
+++ b/networking/udhcp/common.c
-@@ -54,6 +54,8 @@ const struct dhcp_optflag dhcp_optflags[
- { OPTION_SIP_SERVERS , 0x78 }, /* DHCP_SIP_SERVERS */
+@@ -56,6 +56,8 @@ const struct dhcp_optflag dhcp_optflags[] = {
#endif
{ OPTION_STATIC_ROUTES , 0x79 }, /* DHCP_STATIC_ROUTES */
+ { OPTION_STATIC_ROUTES , 0xf9 }, /* DHCP_MS_STATIC_ROUTES */
+ { OPTION_6RD , 0xd4 }, /* DHCP_6RD (RFC) */
+ { OPTION_6RD , 0x96 }, /* DHCP_6RD (Comcast) */
{ OPTION_STRING , 0xfc }, /* DHCP_WPAD */
/* Options below have no match in dhcp_option_strings[],
-@@ -114,6 +116,8 @@ const char dhcp_option_strings[] ALIGN1
+@@ -118,6 +120,8 @@ const char dhcp_option_strings[] ALIGN1 =
// doesn't work in udhcpd.conf since OPTION_STATIC_ROUTES
// is not handled yet by "string->option" conversion code:
"staticroutes" "\0"/* DHCP_STATIC_ROUTES */
+ "ip6rd" "\0" /* DHCP_6RD (RFC) */
+ "ip6rd" "\0" /* DHCP_6RD (Comcast) */
+ "msstaticroutes""\0"/* DHCP_MS_STATIC_ROUTES */
"wpad" "\0" /* DHCP_WPAD */
;
-
-@@ -141,6 +145,7 @@ const uint8_t dhcp_option_lengths[] ALIG
+@@ -146,6 +150,7 @@ const uint8_t dhcp_option_lengths[] ALIGN1 = {
[OPTION_S32] = 4,
/* Just like OPTION_STRING, we use minimum length here */
[OPTION_STATIC_ROUTES] = 5,
@@ -26,9 +28,23 @@
};
+diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h
+index f8f18ff..56cd8b0 100644
+--- a/networking/udhcp/common.h
++++ b/networking/udhcp/common.h
+@@ -88,6 +88,7 @@ enum {
+ OPTION_S32,
+ OPTION_BIN,
+ OPTION_STATIC_ROUTES,
++ OPTION_6RD,
+ #if ENABLE_FEATURE_UDHCP_RFC3397
+ OPTION_DNS_STRING, /* RFC1035 compressed domain name list */
+ OPTION_SIP_SERVERS,
+diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
+index 78aabed..993326f 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
-@@ -45,6 +45,7 @@ static const uint8_t len_of_option_as_st
+@@ -45,6 +45,7 @@ static const uint8_t len_of_option_as_string[] = {
[OPTION_IP ] = sizeof("255.255.255.255 "),
[OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2,
[OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "),
@@ -36,7 +52,7 @@
[OPTION_STRING ] = 1,
#if ENABLE_FEATURE_UDHCP_RFC3397
[OPTION_DNS_STRING ] = 1, /* unused */
-@@ -68,6 +69,23 @@ static int sprint_nip(char *dest, const
+@@ -68,6 +69,23 @@ static int sprint_nip(char *dest, const char *pre, const uint8_t *ip)
return sprintf(dest, "%s%u.%u.%u.%u", pre, ip[0], ip[1], ip[2], ip[3]);
}
@@ -60,7 +76,7 @@
/* really simple implementation, just count the bits */
static int mton(uint32_t mask)
{
-@@ -177,6 +195,70 @@ static NOINLINE char *xmalloc_optname_op
+@@ -177,6 +195,70 @@ static NOINLINE char *xmalloc_optname_optval(uint8_t *option, const struct dhcp_
return ret;
}
@@ -131,13 +147,3 @@
#if ENABLE_FEATURE_UDHCP_RFC3397
case OPTION_DNS_STRING:
/* unpack option into dest; use ret for prefix (i.e., "optname=") */
---- a/networking/udhcp/common.h
-+++ b/networking/udhcp/common.h
-@@ -88,6 +88,7 @@ enum {
- OPTION_S32,
- OPTION_BIN,
- OPTION_STATIC_ROUTES,
-+ OPTION_6RD,
- #if ENABLE_FEATURE_UDHCP_RFC3397
- OPTION_DNS_STRING, /* RFC1035 compressed domain name list */
- OPTION_SIP_SERVERS,
diff --git a/package/busybox/patches/245-udhcpc_add_msroutes_option.patch b/package/busybox/patches/245-udhcpc_add_msroutes_option.patch
deleted file mode 100644
index e8514479a3..0000000000
--- a/package/busybox/patches/245-udhcpc_add_msroutes_option.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/networking/udhcp/common.c
-+++ b/networking/udhcp/common.c
-@@ -53,7 +53,8 @@ const struct dhcp_optflag dhcp_optflags[
- { OPTION_DNS_STRING | OPTION_LIST , 0x77 }, /* DHCP_DOMAIN_SEARCH */
- { OPTION_SIP_SERVERS , 0x78 }, /* DHCP_SIP_SERVERS */
- #endif
-- { OPTION_STATIC_ROUTES , 0x79 }, /* DHCP_STATIC_ROUTES */
-+ { OPTION_STATIC_ROUTES , 0x79 }, /* DHCP_STATIC_ROUTES (RFC) */
-+ { OPTION_STATIC_ROUTES , 0xf9 }, /* DHCP_STATIC_ROUTES (Microsoft) */
- { OPTION_6RD , 0xd4 }, /* DHCP_6RD (RFC) */
- { OPTION_6RD , 0x96 }, /* DHCP_6RD (Comcast) */
- { OPTION_STRING , 0xfc }, /* DHCP_WPAD */
-@@ -115,7 +116,8 @@ const char dhcp_option_strings[] ALIGN1
- #endif
- // doesn't work in udhcpd.conf since OPTION_STATIC_ROUTES
- // is not handled yet by "string->option" conversion code:
-- "staticroutes" "\0"/* DHCP_STATIC_ROUTES */
-+ "staticroutes" "\0" /* DHCP_STATIC_ROUTES (RFC) */
-+ "msstaticroutes" "\0"/* DHCP_STATIC_ROUTES (Microsoft) */
- "ip6rd" "\0" /* DHCP_6RD (RFC) */
- "ip6rd" "\0" /* DHCP_6RD (Comcast) */
- "wpad" "\0" /* DHCP_WPAD */
diff --git a/package/busybox/patches/300-netmsg.patch b/package/busybox/patches/300-netmsg.patch
index b7dd5d9869..d9d2f14a87 100644
--- a/package/busybox/patches/300-netmsg.patch
+++ b/package/busybox/patches/300-netmsg.patch
@@ -1,6 +1,8 @@
+diff --git a/include/applets.src.h b/include/applets.src.h
+index f4fab53..f97f2d8 100644
--- a/include/applets.src.h
+++ b/include/applets.src.h
-@@ -278,6 +278,7 @@ IF_MT(APPLET(mt, _BB_DIR_BIN, _BB_SUID_D
+@@ -256,6 +256,7 @@ IF_MT(APPLET(mt, _BB_DIR_BIN, _BB_SUID_DROP))
IF_MV(APPLET(mv, _BB_DIR_BIN, _BB_SUID_DROP))
IF_NAMEIF(APPLET(nameif, _BB_DIR_SBIN, _BB_SUID_DROP))
IF_NC(APPLET(nc, _BB_DIR_USR_BIN, _BB_SUID_DROP))
@@ -8,9 +10,30 @@
IF_NETSTAT(APPLET(netstat, _BB_DIR_BIN, _BB_SUID_DROP))
IF_NICE(APPLET(nice, _BB_DIR_BIN, _BB_SUID_DROP))
IF_NMETER(APPLET(nmeter, _BB_DIR_USR_BIN, _BB_SUID_DROP))
+diff --git a/include/usage.src.h b/include/usage.src.h
+index 30fef24..ac78992 100644
+--- a/include/usage.src.h
++++ b/include/usage.src.h
+@@ -1,3 +1,4 @@
++
+ /* vi: set sw=8 ts=8: */
+ /*
+ * This file suffers from chronically incorrect tabification
+@@ -2706,6 +2707,9 @@ INSERT
+ " or\n" \
+ "$ nameif -c /etc/my_mactab_file\n" \
+
++#define netmsg_trivial_usage NOUSAGE_STR
++#define netmsg_full_usage ""
++
+ #define nmeter_trivial_usage \
+ "format_string"
+ #define nmeter_full_usage "\n\n" \
+diff --git a/networking/Config.src b/networking/Config.src
+index 6dd7df7..4682dd3 100644
--- a/networking/Config.src
+++ b/networking/Config.src
-@@ -623,6 +623,12 @@ config FEATURE_NAMEIF_EXTENDED
+@@ -640,6 +640,12 @@ config FEATURE_NAMEIF_EXTENDED
new_interface_name mac=00:80:C8:38:91:B5
new_interface_name 00:80:C8:38:91:B5
@@ -23,6 +46,8 @@
config NETSTAT
bool "netstat"
default y
+diff --git a/networking/Kbuild.src b/networking/Kbuild.src
+index f41a2df..6070a40 100644
--- a/networking/Kbuild.src
+++ b/networking/Kbuild.src
@@ -27,6 +27,7 @@ lib-$(CONFIG_IP) += ip.o
@@ -33,6 +58,9 @@
lib-$(CONFIG_NETSTAT) += netstat.o
lib-$(CONFIG_NSLOOKUP) += nslookup.o
lib-$(CONFIG_NTPD) += ntpd.o
+diff --git a/networking/netmsg.c b/networking/netmsg.c
+new file mode 100644
+index 0000000..43aba0d
--- /dev/null
+++ b/networking/netmsg.c
@@ -0,0 +1,63 @@
@@ -99,20 +127,3 @@
+ close(s);
+ exit(1);
+}
---- a/include/usage.src.h
-+++ b/include/usage.src.h
-@@ -1,3 +1,4 @@
-+
- /* vi: set sw=8 ts=8: */
- /*
- * This file suffers from chronically incorrect tabification
-@@ -2961,6 +2962,9 @@ INSERT
- " or\n" \
- "$ nameif -c /etc/my_mactab_file\n" \
-
-+#define netmsg_trivial_usage NOUSAGE_STR
-+#define netmsg_full_usage ""
-+
- #define netstat_trivial_usage \
- "[-laentuwxr"IF_FEATURE_NETSTAT_WIDE("W")IF_FEATURE_NETSTAT_PRG("p")"]"
- #define netstat_full_usage "\n\n" \
diff --git a/package/busybox/patches/610-syslog-remote-retry-connection.patch b/package/busybox/patches/610-syslog-remote-retry-connection.patch
deleted file mode 100644
index 94cd3ded04..0000000000
--- a/package/busybox/patches/610-syslog-remote-retry-connection.patch
+++ /dev/null
@@ -1,39 +0,0 @@
---- a/sysklogd/syslogd.c
-+++ b/sysklogd/syslogd.c
-@@ -555,6 +555,7 @@ static void do_syslogd(void)
- {
- int sock_fd;
- #if ENABLE_FEATURE_REMOTE_LOG
-+ int send_err = 0;
- llist_t *item;
- #endif
- #if ENABLE_FEATURE_SYSLOGD_DUP
-@@ -636,11 +637,23 @@ static void do_syslogd(void)
- if (rh->remoteFD == -1)
- continue;
- }
-- /* Send message to remote logger, ignore possible error */
-- /* TODO: on some errors, close and set G.remoteFD to -1
-- * so that DNS resolution and connect is retried? */
-- sendto(rh->remoteFD, recvbuf, sz+1, MSG_DONTWAIT,
-- &(rh->remoteAddr->u.sa), rh->remoteAddr->len);
-+ /* Send message to remote logger */
-+ if (sendto(rh->remoteFD, recvbuf, sz+1, MSG_DONTWAIT,
-+ &(rh->remoteAddr->u.sa), rh->remoteAddr->len) == -1)
-+ send_err = errno;
-+
-+ /* On some errors, close and set G.remoteFD to -1
-+ * so that DNS resolution and connect is retried */
-+ switch (send_err) {
-+ case ECONNRESET:
-+ case EDESTADDRREQ:
-+ case EISCONN:
-+ case ENOTCONN:
-+ case EPIPE:
-+ close(rh->remoteFD);
-+ rh->remoteFD = -1;
-+ break;
-+ }
- }
- #endif
- if (!ENABLE_FEATURE_REMOTE_LOG || (option_mask32 & OPT_locallog)) {
diff --git a/package/busybox/patches/920-macosx-endian.patch b/package/busybox/patches/920-macosx-endian.patch
deleted file mode 100644
index b895446210..0000000000
--- a/package/busybox/patches/920-macosx-endian.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- a/include/platform.h
-+++ b/include/platform.h
-@@ -154,14 +154,14 @@
- # include <sex.h>
- # define __BIG_ENDIAN__ (BYTE_ORDER == BIG_ENDIAN)
- # define __BYTE_ORDER BYTE_ORDER
--#elif defined __FreeBSD__
-+#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined (__NetBSD__) || defined(__APPLE__)
- # include <sys/resource.h> /* rlimit */
- # include <machine/endian.h>
- # define bswap_64 __bswap64
- # define bswap_32 __bswap32
- # define bswap_16 __bswap16
- # define __BIG_ENDIAN__ (_BYTE_ORDER == _BIG_ENDIAN)
--#elif !defined __APPLE__
-+#else
- # include <byteswap.h>
- # include <endian.h>
- #endif
-@@ -172,9 +172,15 @@
- #elif defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN
- # define BB_BIG_ENDIAN 1
- # define BB_LITTLE_ENDIAN 0
-+#elif defined(_BYTE_ORDER) && _BYTE_ORDER == _BIG_ENDIAN
-+# define BB_BIG_ENDIAN 1
-+# define BB_LITTLE_ENDIAN 0
- #elif (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) || defined(__386__)
- # define BB_BIG_ENDIAN 0
- # define BB_LITTLE_ENDIAN 1
-+#elif defined(_BYTE_ORDER) && _BYTE_ORDER == _LITTLE_ENDIAN
-+# define BB_BIG_ENDIAN 0
-+# define BB_LITTLE_ENDIAN 1
- #else
- # error "Can't determine endianness"
- #endif