1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-27 17:15:00 +02:00

busybox: refresh patches

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33661 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2012-10-08 12:31:27 +00:00
parent 369d1629e4
commit 8c96b4e66a
9 changed files with 25 additions and 26 deletions

View File

@ -1,6 +1,6 @@
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -1257,7 +1257,7 @@ int udhcpc_main(int argc UNUSED_PARAM, c
@@ -1319,7 +1319,7 @@ int udhcpc_main(int argc UNUSED_PARAM, c
switch (state) {
case INIT_SELECTING:
@ -9,7 +9,7 @@
if (packet_num == 0)
xid = random_xid();
/* broadcast */
@@ -1286,7 +1286,7 @@ int udhcpc_main(int argc UNUSED_PARAM, c
@@ -1348,7 +1348,7 @@ int udhcpc_main(int argc UNUSED_PARAM, c
packet_num = 0;
continue;
case REQUESTING:

View File

@ -1,6 +1,6 @@
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -540,6 +540,7 @@ static int raw_bcast_from_client_config_
@@ -602,6 +602,7 @@ static int raw_bcast_from_client_config_
static NOINLINE int send_discover(uint32_t xid, uint32_t requested)
{
struct dhcp_packet packet;
@ -8,7 +8,7 @@
/* Fill in: op, htype, hlen, cookie, chaddr fields,
* random xid field (we override it below),
@@ -557,6 +558,7 @@ static NOINLINE int send_discover(uint32
@@ -619,6 +620,7 @@ static NOINLINE int send_discover(uint32
*/
add_client_options(&packet);

View File

@ -1,6 +1,6 @@
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -1205,6 +1205,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c
@@ -1267,6 +1267,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c
/* silence "uninitialized!" warning */
unsigned timestamp_before_wait = timestamp_before_wait;

View File

@ -18,7 +18,7 @@
"wpad" "\0" /* DHCP_WPAD */
;
@@ -154,6 +158,7 @@ const uint8_t dhcp_option_lengths[] ALIG
@@ -155,6 +159,7 @@ const uint8_t dhcp_option_lengths[] ALIG
[OPTION_S32] = 4,
/* Just like OPTION_STRING, we use minimum length here */
[OPTION_STATIC_ROUTES] = 5,
@ -28,7 +28,7 @@
--- a/networking/udhcp/common.h
+++ b/networking/udhcp/common.h
@@ -88,6 +88,7 @@ enum {
@@ -91,6 +91,7 @@ enum {
OPTION_S32,
OPTION_BIN,
OPTION_STATIC_ROUTES,
@ -44,9 +44,9 @@
[OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "),
+ [OPTION_6RD ] = sizeof("32 128 FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF 255.255.255.255 "),
[OPTION_STRING ] = 1,
[OPTION_STRING_HOST ] = 1,
#if ENABLE_FEATURE_UDHCP_RFC3397
[OPTION_DNS_STRING ] = 1, /* unused */
@@ -123,6 +124,23 @@ static int sprint_nip(char *dest, const
@@ -124,6 +125,23 @@ static int sprint_nip(char *dest, const
return sprintf(dest, "%s%u.%u.%u.%u", pre, ip[0], ip[1], ip[2], ip[3]);
}
@ -70,11 +70,10 @@
/* really simple implementation, just count the bits */
static int mton(uint32_t mask)
{
@@ -231,6 +249,70 @@ static NOINLINE char *xmalloc_optname_op
}
@@ -293,6 +311,70 @@ static NOINLINE char *xmalloc_optname_op
return ret;
+ }
}
+ case OPTION_6RD: {
+ /* Option binary format:
+ * 0 1 2 3
@ -138,6 +137,7 @@
+ }
+
+ return ret;
}
+ }
#if ENABLE_FEATURE_UDHCP_RFC3397
case OPTION_DNS_STRING:
/* unpack option into dest; use ret for prefix (i.e., "optname=") */

View File

@ -1,6 +1,6 @@
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -983,7 +983,6 @@ static void perform_renew(void)
@@ -1045,7 +1045,6 @@ static void perform_renew(void)
state = RENEW_REQUESTED;
break;
case RENEW_REQUESTED: /* impatient are we? fine, square 1 */

View File

@ -1,6 +1,5 @@
diff -ur busybox-1.19.4.orig/networking/udhcp/dhcpc.c busybox-1.19.4/networking/udhcp/dhcpc.c
--- busybox-1.19.4.orig/networking/udhcp/dhcpc.c 2012-09-06 22:33:53.476998721 +0400
+++ busybox-1.19.4/networking/udhcp/dhcpc.c 2012-09-07 01:09:46.693372304 +0400
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -26,8 +26,8 @@
#include "dhcpc.h"
@ -11,7 +10,7 @@ diff -ur busybox-1.19.4.orig/networking/udhcp/dhcpc.c busybox-1.19.4/networking/
/* struct client_config_t client_config is in bb_common_bufsiz1 */
@@ -784,17 +784,41 @@
@@ -846,17 +846,41 @@ static int send_release(uint32_t server,
static NOINLINE int udhcp_recv_raw_packet(struct dhcp_packet *dhcp_pkt, int fd)
{
int bytes;
@ -54,7 +53,7 @@ diff -ur busybox-1.19.4.orig/networking/udhcp/dhcpc.c busybox-1.19.4/networking/
if (bytes < (int) (sizeof(packet.ip) + sizeof(packet.udp))) {
log1("Packet is too short, ignoring");
return -2;
@@ -834,7 +858,7 @@
@@ -896,7 +920,7 @@ static NOINLINE int udhcp_recv_raw_packe
packet.ip.tot_len = packet.udp.len; /* yes, this is needed */
check = packet.udp.check;
packet.udp.check = 0;
@ -63,7 +62,7 @@ diff -ur busybox-1.19.4.orig/networking/udhcp/dhcpc.c busybox-1.19.4/networking/
log1("Packet with bad UDP checksum received, ignoring");
return -2;
}
@@ -880,6 +904,7 @@
@@ -942,6 +966,7 @@ static int udhcp_raw_socket(int ifindex)
{
int fd;
struct sockaddr_ll sock;
@ -71,7 +70,7 @@ diff -ur busybox-1.19.4.orig/networking/udhcp/dhcpc.c busybox-1.19.4/networking/
/*
* Comment:
@@ -946,6 +971,13 @@
@@ -1008,6 +1033,13 @@ static int udhcp_raw_socket(int ifindex)
log1("Attached filter to raw socket fd %d", fd); // log?
}