mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-19 21:58:04 +00:00
busybox: refresh patches
SVN-Revision: 33661
This commit is contained in:
parent
37e89213fd
commit
4fdea4ee6a
@ -1,6 +1,6 @@
|
|||||||
--- a/networking/udhcp/dhcpc.c
|
--- a/networking/udhcp/dhcpc.c
|
||||||
+++ b/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) {
|
switch (state) {
|
||||||
case INIT_SELECTING:
|
case INIT_SELECTING:
|
||||||
@ -9,7 +9,7 @@
|
|||||||
if (packet_num == 0)
|
if (packet_num == 0)
|
||||||
xid = random_xid();
|
xid = random_xid();
|
||||||
/* broadcast */
|
/* 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;
|
packet_num = 0;
|
||||||
continue;
|
continue;
|
||||||
case REQUESTING:
|
case REQUESTING:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/networking/udhcp/dhcpc.c
|
--- a/networking/udhcp/dhcpc.c
|
||||||
+++ b/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)
|
static NOINLINE int send_discover(uint32_t xid, uint32_t requested)
|
||||||
{
|
{
|
||||||
struct dhcp_packet packet;
|
struct dhcp_packet packet;
|
||||||
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
/* Fill in: op, htype, hlen, cookie, chaddr fields,
|
/* Fill in: op, htype, hlen, cookie, chaddr fields,
|
||||||
* random xid field (we override it below),
|
* 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);
|
add_client_options(&packet);
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/networking/udhcp/dhcpc.c
|
--- a/networking/udhcp/dhcpc.c
|
||||||
+++ b/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 */
|
/* silence "uninitialized!" warning */
|
||||||
unsigned timestamp_before_wait = timestamp_before_wait;
|
unsigned timestamp_before_wait = timestamp_before_wait;
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
{ OPTION_STRING , 0xfc }, /* DHCP_WPAD */
|
{ OPTION_STRING , 0xfc }, /* DHCP_WPAD */
|
||||||
|
|
||||||
/* Options below have no match in dhcp_option_strings[],
|
/* Options below have no match in dhcp_option_strings[],
|
||||||
@@ -127,6 +129,8 @@ const char dhcp_option_strings[] ALIGN1
|
@@ -127,6 +129,8 @@ const char dhcp_option_strings[] ALIGN1
|
||||||
"vlanpriority" "\0"/* DHCP_VLAN_PRIORITY */
|
"vlanpriority" "\0"/* DHCP_VLAN_PRIORITY */
|
||||||
#endif
|
#endif
|
||||||
"msstaticroutes""\0"/* DHCP_MS_STATIC_ROUTES */
|
"msstaticroutes""\0"/* DHCP_MS_STATIC_ROUTES */
|
||||||
@ -18,7 +18,7 @@
|
|||||||
"wpad" "\0" /* DHCP_WPAD */
|
"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,
|
[OPTION_S32] = 4,
|
||||||
/* Just like OPTION_STRING, we use minimum length here */
|
/* Just like OPTION_STRING, we use minimum length here */
|
||||||
[OPTION_STATIC_ROUTES] = 5,
|
[OPTION_STATIC_ROUTES] = 5,
|
||||||
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
--- a/networking/udhcp/common.h
|
--- a/networking/udhcp/common.h
|
||||||
+++ b/networking/udhcp/common.h
|
+++ b/networking/udhcp/common.h
|
||||||
@@ -88,6 +88,7 @@ enum {
|
@@ -91,6 +91,7 @@ enum {
|
||||||
OPTION_S32,
|
OPTION_S32,
|
||||||
OPTION_BIN,
|
OPTION_BIN,
|
||||||
OPTION_STATIC_ROUTES,
|
OPTION_STATIC_ROUTES,
|
||||||
@ -44,9 +44,9 @@
|
|||||||
[OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "),
|
[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_6RD ] = sizeof("32 128 FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF 255.255.255.255 "),
|
||||||
[OPTION_STRING ] = 1,
|
[OPTION_STRING ] = 1,
|
||||||
|
[OPTION_STRING_HOST ] = 1,
|
||||||
#if ENABLE_FEATURE_UDHCP_RFC3397
|
#if ENABLE_FEATURE_UDHCP_RFC3397
|
||||||
[OPTION_DNS_STRING ] = 1, /* unused */
|
@@ -124,6 +125,23 @@ static int sprint_nip(char *dest, const
|
||||||
@@ -123,6 +124,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]);
|
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 */
|
/* really simple implementation, just count the bits */
|
||||||
static int mton(uint32_t mask)
|
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;
|
return ret;
|
||||||
+ }
|
}
|
||||||
+ case OPTION_6RD: {
|
+ case OPTION_6RD: {
|
||||||
+ /* Option binary format:
|
+ /* Option binary format:
|
||||||
+ * 0 1 2 3
|
+ * 0 1 2 3
|
||||||
@ -138,6 +137,7 @@
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ return ret;
|
+ return ret;
|
||||||
}
|
+ }
|
||||||
#if ENABLE_FEATURE_UDHCP_RFC3397
|
#if ENABLE_FEATURE_UDHCP_RFC3397
|
||||||
case OPTION_DNS_STRING:
|
case OPTION_DNS_STRING:
|
||||||
|
/* unpack option into dest; use ret for prefix (i.e., "optname=") */
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
--- a/networking/httpd.c
|
--- a/networking/httpd.c
|
||||||
+++ b/networking/httpd.c
|
+++ b/networking/httpd.c
|
||||||
@@ -1700,21 +1700,32 @@ static int check_user_passwd(const char
|
@@ -1700,21 +1700,32 @@ static int check_user_passwd(const char
|
||||||
|
|
||||||
if (ENABLE_FEATURE_HTTPD_AUTH_MD5) {
|
if (ENABLE_FEATURE_HTTPD_AUTH_MD5) {
|
||||||
char *md5_passwd;
|
char *md5_passwd;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/include/applets.src.h
|
--- a/include/applets.src.h
|
||||||
+++ b/include/applets.src.h
|
+++ b/include/applets.src.h
|
||||||
@@ -218,6 +218,7 @@ IF_LN(APPLET_NOEXEC(ln, ln, BB_DIR_BIN,
|
@@ -218,6 +218,7 @@ IF_LN(APPLET_NOEXEC(ln, ln, BB_DIR_BIN,
|
||||||
IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP))
|
IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP))
|
||||||
IF_LOADFONT(APPLET(loadfont, BB_DIR_USR_SBIN, BB_SUID_DROP))
|
IF_LOADFONT(APPLET(loadfont, BB_DIR_USR_SBIN, BB_SUID_DROP))
|
||||||
IF_LOADKMAP(APPLET(loadkmap, BB_DIR_SBIN, BB_SUID_DROP))
|
IF_LOADKMAP(APPLET(loadkmap, BB_DIR_SBIN, BB_SUID_DROP))
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/networking/udhcp/dhcpc.c
|
--- a/networking/udhcp/dhcpc.c
|
||||||
+++ b/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;
|
state = RENEW_REQUESTED;
|
||||||
break;
|
break;
|
||||||
case RENEW_REQUESTED: /* impatient are we? fine, square 1 */
|
case RENEW_REQUESTED: /* impatient are we? fine, square 1 */
|
||||||
|
@ -31,7 +31,7 @@ Signed-off-by: Nicolas Thill <nico@openwrt.org>
|
|||||||
/* I guess *n < 0 might indicate error. Anyway,
|
/* I guess *n < 0 might indicate error. Anyway,
|
||||||
* malloc'ing -1 bytes won't be good, so: */
|
* malloc'ing -1 bytes won't be good, so: */
|
||||||
if (*n < 0)
|
if (*n < 0)
|
||||||
@@ -210,6 +216,7 @@ int id_main(int argc UNUSED_PARAM, char
|
@@ -210,6 +216,7 @@ int id_main(int argc UNUSED_PARAM, char
|
||||||
if (egid != rgid)
|
if (egid != rgid)
|
||||||
status |= print_group(egid, " ");
|
status |= print_group(egid, " ");
|
||||||
}
|
}
|
||||||
@ -39,7 +39,7 @@ Signed-off-by: Nicolas Thill <nico@openwrt.org>
|
|||||||
/* We are supplying largish buffer, trying
|
/* We are supplying largish buffer, trying
|
||||||
* to not run get_groups() twice. That might be slow
|
* to not run get_groups() twice. That might be slow
|
||||||
* ("user database in remote SQL server" case) */
|
* ("user database in remote SQL server" case) */
|
||||||
@@ -236,6 +243,7 @@ int id_main(int argc UNUSED_PARAM, char
|
@@ -236,6 +243,7 @@ int id_main(int argc UNUSED_PARAM, char
|
||||||
}
|
}
|
||||||
if (ENABLE_FEATURE_CLEAN_UP)
|
if (ENABLE_FEATURE_CLEAN_UP)
|
||||||
free(groups);
|
free(groups);
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
diff -ur busybox-1.19.4.orig/networking/udhcp/dhcpc.c busybox-1.19.4/networking/udhcp/dhcpc.c
|
--- a/networking/udhcp/dhcpc.c
|
||||||
--- busybox-1.19.4.orig/networking/udhcp/dhcpc.c 2012-09-06 22:33:53.476998721 +0400
|
+++ b/networking/udhcp/dhcpc.c
|
||||||
+++ busybox-1.19.4/networking/udhcp/dhcpc.c 2012-09-07 01:09:46.693372304 +0400
|
|
||||||
@@ -26,8 +26,8 @@
|
@@ -26,8 +26,8 @@
|
||||||
#include "dhcpc.h"
|
#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 */
|
/* 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)
|
static NOINLINE int udhcp_recv_raw_packet(struct dhcp_packet *dhcp_pkt, int fd)
|
||||||
{
|
{
|
||||||
int bytes;
|
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))) {
|
if (bytes < (int) (sizeof(packet.ip) + sizeof(packet.udp))) {
|
||||||
log1("Packet is too short, ignoring");
|
log1("Packet is too short, ignoring");
|
||||||
return -2;
|
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 */
|
packet.ip.tot_len = packet.udp.len; /* yes, this is needed */
|
||||||
check = packet.udp.check;
|
check = packet.udp.check;
|
||||||
packet.udp.check = 0;
|
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");
|
log1("Packet with bad UDP checksum received, ignoring");
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
@@ -880,6 +904,7 @@
|
@@ -942,6 +966,7 @@ static int udhcp_raw_socket(int ifindex)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
struct sockaddr_ll sock;
|
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:
|
* 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?
|
log1("Attached filter to raw socket fd %d", fd); // log?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user