busybox: update to 1.30.1.
New package: busybox-core-1.30.1 New package: busybox-huge-1.30.1
This commit is contained in:
parent
af55b45830
commit
abafac79eb
|
@ -0,0 +1 @@
|
|||
busybox
|
|
@ -0,0 +1 @@
|
|||
busybox
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
exec busybox klogd -n
|
|
@ -1 +0,0 @@
|
|||
busybox.dotconfig
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
exec busybox syslogd -n
|
|
@ -25,6 +25,7 @@ CONFIG_FEATURE_DEVPTS=y
|
|||
CONFIG_PID_FILE_PATH=""
|
||||
CONFIG_BUSYBOX=y
|
||||
# CONFIG_FEATURE_INSTALLER is not set
|
||||
# CONFIG_FEATURE_SHOW_SCRIPT is not set
|
||||
# CONFIG_INSTALL_NO_USR is not set
|
||||
CONFIG_FEATURE_SUID=y
|
||||
# CONFIG_FEATURE_SUID_CONFIG is not set
|
||||
|
@ -82,7 +83,9 @@ CONFIG_NO_DEBUG_LIB=y
|
|||
# Library Tuning
|
||||
#
|
||||
# CONFIG_FEATURE_USE_BSS_TAIL is not set
|
||||
CONFIG_FLOAT_DURATION=y
|
||||
CONFIG_FEATURE_RTMINMAX=y
|
||||
CONFIG_FEATURE_RTMINMAX_USE_LIBC_DEFINITIONS=y
|
||||
CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
|
||||
# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
|
||||
# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
|
||||
|
@ -205,6 +208,7 @@ CONFIG_CHROOT=y
|
|||
CONFIG_COMM=y
|
||||
CONFIG_CP=y
|
||||
CONFIG_FEATURE_CP_LONG_OPTIONS=y
|
||||
CONFIG_FEATURE_CP_REFLINK=y
|
||||
CONFIG_CUT=y
|
||||
CONFIG_DATE=y
|
||||
CONFIG_FEATURE_DATE_ISOFMT=y
|
||||
|
@ -287,7 +291,6 @@ CONFIG_SHRED=y
|
|||
CONFIG_SHUF=y
|
||||
CONFIG_SLEEP=y
|
||||
CONFIG_FEATURE_FANCY_SLEEP=y
|
||||
CONFIG_FEATURE_FLOAT_SLEEP=y
|
||||
CONFIG_SORT=y
|
||||
CONFIG_FEATURE_SORT_BIG=y
|
||||
# CONFIG_FEATURE_SORT_OPTIMIZE_MEMORY is not set
|
||||
|
@ -438,6 +441,7 @@ CONFIG_FEATURE_FIND_MTIME=y
|
|||
CONFIG_FEATURE_FIND_MMIN=y
|
||||
CONFIG_FEATURE_FIND_PERM=y
|
||||
CONFIG_FEATURE_FIND_TYPE=y
|
||||
CONFIG_FEATURE_FIND_EXECUTABLE=y
|
||||
CONFIG_FEATURE_FIND_XDEV=y
|
||||
CONFIG_FEATURE_FIND_MAXDEPTH=y
|
||||
CONFIG_FEATURE_FIND_NEWER=y
|
||||
|
@ -451,6 +455,7 @@ CONFIG_FEATURE_FIND_DEPTH=y
|
|||
CONFIG_FEATURE_FIND_PAREN=y
|
||||
CONFIG_FEATURE_FIND_SIZE=y
|
||||
CONFIG_FEATURE_FIND_PRUNE=y
|
||||
CONFIG_FEATURE_FIND_QUIT=y
|
||||
CONFIG_FEATURE_FIND_DELETE=y
|
||||
CONFIG_FEATURE_FIND_PATH=y
|
||||
CONFIG_FEATURE_FIND_REGEX=y
|
||||
|
@ -653,6 +658,8 @@ CONFIG_FEATURE_MOUNT_FLAGS=y
|
|||
CONFIG_FEATURE_MOUNT_FSTAB=y
|
||||
CONFIG_FEATURE_MOUNT_OTHERTAB=y
|
||||
# CONFIG_MOUNTPOINT is not set
|
||||
# CONFIG_NOLOGIN is not set
|
||||
# CONFIG_NOLOGIN_DEPENDENCIES is not set
|
||||
CONFIG_NSENTER=y
|
||||
CONFIG_PIVOT_ROOT=y
|
||||
# CONFIG_RDATE is not set
|
||||
|
@ -728,6 +735,7 @@ CONFIG_FEATURE_VOLUMEID_XFS=y
|
|||
# CONFIG_ADJTIMEX is not set
|
||||
# CONFIG_BBCONFIG is not set
|
||||
# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set
|
||||
# CONFIG_BC is not set
|
||||
# CONFIG_BEEP is not set
|
||||
CONFIG_FEATURE_BEEP_FREQ=0
|
||||
CONFIG_FEATURE_BEEP_LENGTH_MS=0
|
||||
|
@ -747,6 +755,8 @@ CONFIG_FEATURE_BEEP_LENGTH_MS=0
|
|||
CONFIG_FEATURE_CROND_DIR=""
|
||||
# CONFIG_CRONTAB is not set
|
||||
CONFIG_DC=y
|
||||
# CONFIG_FEATURE_DC_BIG is not set
|
||||
# CONFIG_FEATURE_DC_LIBM is not set
|
||||
CONFIG_FEATURE_DC_LIBM=y
|
||||
# CONFIG_DEVFSD is not set
|
||||
# CONFIG_DEVFSD_MODLOAD is not set
|
||||
|
@ -822,6 +832,7 @@ CONFIG_FEATURE_IPV6=y
|
|||
CONFIG_FEATURE_UNIX_LOCAL=y
|
||||
CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
|
||||
# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
|
||||
# CONFIG_FEATURE_TLS_SHA1 is not set
|
||||
# CONFIG_ARP is not set
|
||||
# CONFIG_ARPING is not set
|
||||
CONFIG_BRCTL=y
|
||||
|
@ -906,9 +917,10 @@ CONFIG_FEATURE_NETSTAT_PRG=y
|
|||
CONFIG_NSLOOKUP=y
|
||||
CONFIG_FEATURE_NSLOOKUP_BIG=y
|
||||
CONFIG_FEATURE_NSLOOKUP_LONG_OPTIONS=y
|
||||
CONFIG_NTPD=y
|
||||
CONFIG_FEATURE_NTPD_SERVER=y
|
||||
CONFIG_FEATURE_NTPD_CONF=y
|
||||
# CONFIG_NTPD is not set
|
||||
# CONFIG_FEATURE_NTPD_SERVER is not set
|
||||
# CONFIG_FEATURE_NTPD_CONF is not set
|
||||
# CONFIG_FEATURE_NTP_AUTH is not set
|
||||
CONFIG_PING=y
|
||||
CONFIG_PING6=y
|
||||
CONFIG_FEATURE_FANCY_PING=y
|
||||
|
@ -957,9 +969,9 @@ CONFIG_WHOIS=y
|
|||
CONFIG_DHCPD_LEASES_FILE=""
|
||||
# CONFIG_DUMPLEASES is not set
|
||||
# CONFIG_DHCPRELAY is not set
|
||||
CONFIG_UDHCPC=y
|
||||
CONFIG_FEATURE_UDHCPC_ARPING=y
|
||||
CONFIG_FEATURE_UDHCPC_SANITIZEOPT=y
|
||||
# CONFIG_UDHCPC is not set
|
||||
# CONFIG_FEATURE_UDHCPC_ARPING is not set
|
||||
# CONFIG_FEATURE_UDHCPC_SANITIZEOPT is not set
|
||||
CONFIG_UDHCPC_DEFAULT_SCRIPT=""
|
||||
# CONFIG_UDHCPC6 is not set
|
||||
# CONFIG_FEATURE_UDHCPC6_RFC3646 is not set
|
||||
|
@ -970,11 +982,11 @@ CONFIG_UDHCPC_DEFAULT_SCRIPT=""
|
|||
#
|
||||
# Common options for DHCP applets
|
||||
#
|
||||
CONFIG_FEATURE_UDHCP_PORT=y
|
||||
CONFIG_UDHCP_DEBUG=0
|
||||
CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=0
|
||||
CONFIG_FEATURE_UDHCP_RFC3397=y
|
||||
CONFIG_FEATURE_UDHCP_8021Q=y
|
||||
# CONFIG_FEATURE_UDHCP_PORT is not set
|
||||
# CONFIG_UDHCP_DEBUG is not set
|
||||
# CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS is not set
|
||||
# CONFIG_FEATURE_UDHCP_RFC3397 is not set
|
||||
# CONFIG_FEATURE_UDHCP_8021Q is not set
|
||||
CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS=""
|
||||
|
||||
#
|
||||
|
@ -1141,6 +1153,7 @@ CONFIG_FEATURE_SH_MATH_64=y
|
|||
CONFIG_FEATURE_SH_EXTRA_QUIET=y
|
||||
# CONFIG_FEATURE_SH_STANDALONE is not set
|
||||
# CONFIG_FEATURE_SH_NOFORK is not set
|
||||
# CONFIG_FEATURE_SH_EMBEDDED_SCRIPTS is not set
|
||||
CONFIG_FEATURE_SH_READ_FRAC=y
|
||||
CONFIG_FEATURE_SH_HISTFILESIZE=y
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
@@ -838,18 +838,18 @@
|
||||
# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
|
||||
CONFIG_HOSTNAME=y
|
||||
CONFIG_DNSDOMAINNAME=y
|
||||
-# CONFIG_HTTPD is not set
|
||||
-# CONFIG_FEATURE_HTTPD_RANGES is not set
|
||||
-# CONFIG_FEATURE_HTTPD_SETUID is not set
|
||||
-# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set
|
||||
-# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
|
||||
-# CONFIG_FEATURE_HTTPD_CGI is not set
|
||||
-# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set
|
||||
-# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set
|
||||
-# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set
|
||||
-# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set
|
||||
-# CONFIG_FEATURE_HTTPD_PROXY is not set
|
||||
-# CONFIG_FEATURE_HTTPD_GZIP is not set
|
||||
+CONFIG_HTTPD=y
|
||||
+CONFIG_FEATURE_HTTPD_RANGES=y
|
||||
+CONFIG_FEATURE_HTTPD_SETUID=y
|
||||
+CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
|
||||
+CONFIG_FEATURE_HTTPD_AUTH_MD5=y
|
||||
+CONFIG_FEATURE_HTTPD_CGI=y
|
||||
+CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y
|
||||
+CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y
|
||||
+CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
|
||||
+CONFIG_FEATURE_HTTPD_ERROR_PAGES=y
|
||||
+CONFIG_FEATURE_HTTPD_PROXY=y
|
||||
+CONFIG_FEATURE_HTTPD_GZIP=y
|
||||
CONFIG_IFCONFIG=y
|
||||
CONFIG_FEATURE_IFCONFIG_STATUS=y
|
||||
CONFIG_FEATURE_IFCONFIG_SLIP=y
|
|
@ -0,0 +1,19 @@
|
|||
@@ -624,12 +624,12 @@
|
||||
CONFIG_LOSETUP=y
|
||||
CONFIG_LSPCI=y
|
||||
CONFIG_LSUSB=y
|
||||
-# CONFIG_MDEV is not set
|
||||
-# CONFIG_FEATURE_MDEV_CONF is not set
|
||||
-# CONFIG_FEATURE_MDEV_RENAME is not set
|
||||
-# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set
|
||||
-# CONFIG_FEATURE_MDEV_EXEC is not set
|
||||
-# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set
|
||||
+CONFIG_MDEV=y
|
||||
+CONFIG_FEATURE_MDEV_CONF=y
|
||||
+CONFIG_FEATURE_MDEV_RENAME=y
|
||||
+CONFIG_FEATURE_MDEV_RENAME_REGEXP=y
|
||||
+CONFIG_FEATURE_MDEV_EXEC=y
|
||||
+CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y
|
||||
# CONFIG_MESG is not set
|
||||
# CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP is not set
|
||||
# CONFIG_MKE2FS is not set
|
|
@ -0,0 +1,15 @@
|
|||
@@ -917,10 +917,10 @@
|
||||
CONFIG_NSLOOKUP=y
|
||||
CONFIG_FEATURE_NSLOOKUP_BIG=y
|
||||
CONFIG_FEATURE_NSLOOKUP_LONG_OPTIONS=y
|
||||
-# CONFIG_NTPD is not set
|
||||
-# CONFIG_FEATURE_NTPD_SERVER is not set
|
||||
-# CONFIG_FEATURE_NTPD_CONF is not set
|
||||
-# CONFIG_FEATURE_NTP_AUTH is not set
|
||||
+CONFIG_NTPD=y
|
||||
+CONFIG_FEATURE_NTPD_SERVER=y
|
||||
+CONFIG_FEATURE_NTPD_CONF=y
|
||||
+CONFIG_FEATURE_NTP_AUTH=y
|
||||
CONFIG_PING=y
|
||||
CONFIG_PING6=y
|
||||
CONFIG_FEATURE_FANCY_PING=y
|
|
@ -0,0 +1,9 @@
|
|||
@@ -39,7 +39,7 @@
|
||||
#
|
||||
# Build Options
|
||||
#
|
||||
-# CONFIG_STATIC is not set
|
||||
+CONFIG_STATIC=y
|
||||
# CONFIG_PIE is not set
|
||||
# CONFIG_NOMMU is not set
|
||||
# CONFIG_BUILD_LIBBUSYBOX is not set
|
|
@ -0,0 +1,27 @@
|
|||
@@ -1147,17 +1147,17 @@
|
||||
#
|
||||
# System Logging Utilities
|
||||
#
|
||||
-# CONFIG_KLOGD is not set
|
||||
+CONFIG_KLOGD=y
|
||||
# CONFIG_FEATURE_KLOGD_KLOGCTL is not set
|
||||
CONFIG_LOGGER=y
|
||||
-# CONFIG_LOGREAD is not set
|
||||
+CONFIG_LOGREAD=y
|
||||
# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set
|
||||
-# CONFIG_SYSLOGD is not set
|
||||
-# CONFIG_FEATURE_ROTATE_LOGFILE is not set
|
||||
-# CONFIG_FEATURE_REMOTE_LOG is not set
|
||||
-# CONFIG_FEATURE_SYSLOGD_DUP is not set
|
||||
+CONFIG_SYSLOGD=y
|
||||
+CONFIG_FEATURE_ROTATE_LOGFILE=y
|
||||
+CONFIG_FEATURE_REMOTE_LOG=y
|
||||
+CONFIG_FEATURE_SYSLOGD_DUP=y
|
||||
# CONFIG_FEATURE_SYSLOGD_CFG is not set
|
||||
-CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0
|
||||
-# CONFIG_FEATURE_IPC_SYSLOG is not set
|
||||
-CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0
|
||||
+CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256
|
||||
+CONFIG_FEATURE_IPC_SYSLOG=y
|
||||
+CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=512
|
||||
# CONFIG_FEATURE_KMSG_SYSLOG is not set
|
|
@ -0,0 +1,30 @@
|
|||
@@ -957,9 +957,9 @@
|
||||
CONFIG_DHCPD_LEASES_FILE=""
|
||||
# CONFIG_DUMPLEASES is not set
|
||||
# CONFIG_DHCPRELAY is not set
|
||||
-# CONFIG_UDHCPC is not set
|
||||
-# CONFIG_FEATURE_UDHCPC_ARPING is not set
|
||||
-# CONFIG_FEATURE_UDHCPC_SANITIZEOPT is not set
|
||||
+CONFIG_UDHCPC=y
|
||||
+CONFIG_FEATURE_UDHCPC_ARPING=y
|
||||
+CONFIG_FEATURE_UDHCPC_SANITIZEOPT=y
|
||||
CONFIG_UDHCPC_DEFAULT_SCRIPT=""
|
||||
# CONFIG_UDHCPC6 is not set
|
||||
# CONFIG_FEATURE_UDHCPC6_RFC3646 is not set
|
||||
@@ -970,11 +970,11 @@
|
||||
#
|
||||
# Common options for DHCP applets
|
||||
#
|
||||
-# CONFIG_FEATURE_UDHCP_PORT is not set
|
||||
-# CONFIG_UDHCP_DEBUG is not set
|
||||
-# CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS is not set
|
||||
-# CONFIG_FEATURE_UDHCP_RFC3397 is not set
|
||||
-# CONFIG_FEATURE_UDHCP_8021Q is not set
|
||||
+CONFIG_FEATURE_UDHCP_PORT=y
|
||||
+CONFIG_UDHCP_DEBUG=0
|
||||
+CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=0
|
||||
+CONFIG_FEATURE_UDHCP_RFC3397=y
|
||||
+CONFIG_FEATURE_UDHCP_8021Q=y
|
||||
CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS=""
|
||||
|
||||
#
|
|
@ -1,128 +0,0 @@
|
|||
commit 6d3b4bb24da9a07c263f3c1acf8df85382ff562c
|
||||
Author: Denys Vlasenko <vda.linux@googlemail.com>
|
||||
Date: Mon Dec 17 18:07:18 2018 +0100
|
||||
|
||||
udhcpc: check that 4-byte options are indeed 4-byte, closes 11506
|
||||
|
||||
function old new delta
|
||||
udhcp_get_option32 - 27 +27
|
||||
udhcp_get_option 231 248 +17
|
||||
------------------------------------------------------------------------------
|
||||
(add/remove: 1/0 grow/shrink: 1/0 up/down: 44/0) Total: 44 bytes
|
||||
|
||||
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
||||
|
||||
diff --git networking/udhcp/common.c networking/udhcp/common.c
|
||||
index e5fd74f91..41b05b855 100644
|
||||
--- networking/udhcp/common.c
|
||||
+++ networking/udhcp/common.c
|
||||
@@ -272,6 +272,15 @@ uint8_t* FAST_FUNC udhcp_get_option(struct dhcp_packet *packet, int code)
|
||||
goto complain; /* complain and return NULL */
|
||||
|
||||
if (optionptr[OPT_CODE] == code) {
|
||||
+ if (optionptr[OPT_LEN] == 0) {
|
||||
+ /* So far no valid option with length 0 known.
|
||||
+ * Having this check means that searching
|
||||
+ * for DHCP_MESSAGE_TYPE need not worry
|
||||
+ * that returned pointer might be unsafe
|
||||
+ * to dereference.
|
||||
+ */
|
||||
+ goto complain; /* complain and return NULL */
|
||||
+ }
|
||||
log_option("option found", optionptr);
|
||||
return optionptr + OPT_DATA;
|
||||
}
|
||||
@@ -289,6 +298,16 @@ uint8_t* FAST_FUNC udhcp_get_option(struct dhcp_packet *packet, int code)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+uint8_t* FAST_FUNC udhcp_get_option32(struct dhcp_packet *packet, int code)
|
||||
+{
|
||||
+ uint8_t *r = udhcp_get_option(packet, code);
|
||||
+ if (r) {
|
||||
+ if (r[-1] != 4)
|
||||
+ r = NULL;
|
||||
+ }
|
||||
+ return r;
|
||||
+}
|
||||
+
|
||||
/* Return the position of the 'end' option (no bounds checking) */
|
||||
int FAST_FUNC udhcp_end_option(uint8_t *optionptr)
|
||||
{
|
||||
diff --git networking/udhcp/common.h networking/udhcp/common.h
|
||||
index 7ad603d33..9511152ff 100644
|
||||
--- networking/udhcp/common.h
|
||||
+++ networking/udhcp/common.h
|
||||
@@ -205,6 +205,10 @@ extern const uint8_t dhcp_option_lengths[] ALIGN1;
|
||||
unsigned FAST_FUNC udhcp_option_idx(const char *name, const char *option_strings);
|
||||
|
||||
uint8_t *udhcp_get_option(struct dhcp_packet *packet, int code) FAST_FUNC;
|
||||
+/* Same as above + ensures that option length is 4 bytes
|
||||
+ * (returns NULL if size is different)
|
||||
+ */
|
||||
+uint8_t *udhcp_get_option32(struct dhcp_packet *packet, int code) FAST_FUNC;
|
||||
int udhcp_end_option(uint8_t *optionptr) FAST_FUNC;
|
||||
void udhcp_add_binary_option(struct dhcp_packet *packet, uint8_t *addopt) FAST_FUNC;
|
||||
#if ENABLE_UDHCPC || ENABLE_UDHCPD
|
||||
diff --git networking/udhcp/dhcpc.c networking/udhcp/dhcpc.c
|
||||
index 4b23e4d39..5b3fd531c 100644
|
||||
--- networking/udhcp/dhcpc.c
|
||||
+++ networking/udhcp/dhcpc.c
|
||||
@@ -1691,7 +1691,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
|
||||
* They say ISC DHCP client supports this case.
|
||||
*/
|
||||
server_addr = 0;
|
||||
- temp = udhcp_get_option(&packet, DHCP_SERVER_ID);
|
||||
+ temp = udhcp_get_option32(&packet, DHCP_SERVER_ID);
|
||||
if (!temp) {
|
||||
bb_error_msg("no server ID, using 0.0.0.0");
|
||||
} else {
|
||||
@@ -1718,7 +1718,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
|
||||
struct in_addr temp_addr;
|
||||
uint8_t *temp;
|
||||
|
||||
- temp = udhcp_get_option(&packet, DHCP_LEASE_TIME);
|
||||
+ temp = udhcp_get_option32(&packet, DHCP_LEASE_TIME);
|
||||
if (!temp) {
|
||||
bb_error_msg("no lease time with ACK, using 1 hour lease");
|
||||
lease_seconds = 60 * 60;
|
||||
@@ -1813,7 +1813,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
|
||||
uint32_t svid;
|
||||
uint8_t *temp;
|
||||
|
||||
- temp = udhcp_get_option(&packet, DHCP_SERVER_ID);
|
||||
+ temp = udhcp_get_option32(&packet, DHCP_SERVER_ID);
|
||||
if (!temp) {
|
||||
non_matching_svid:
|
||||
log1("received DHCP NAK with wrong"
|
||||
diff --git networking/udhcp/dhcpd.c networking/udhcp/dhcpd.c
|
||||
index a8cd3f03b..477856d11 100644
|
||||
--- networking/udhcp/dhcpd.c
|
||||
+++ networking/udhcp/dhcpd.c
|
||||
@@ -640,7 +640,7 @@ static void add_server_options(struct dhcp_packet *packet)
|
||||
static uint32_t select_lease_time(struct dhcp_packet *packet)
|
||||
{
|
||||
uint32_t lease_time_sec = server_config.max_lease_sec;
|
||||
- uint8_t *lease_time_opt = udhcp_get_option(packet, DHCP_LEASE_TIME);
|
||||
+ uint8_t *lease_time_opt = udhcp_get_option32(packet, DHCP_LEASE_TIME);
|
||||
if (lease_time_opt) {
|
||||
move_from_unaligned32(lease_time_sec, lease_time_opt);
|
||||
lease_time_sec = ntohl(lease_time_sec);
|
||||
@@ -987,7 +987,7 @@ int udhcpd_main(int argc UNUSED_PARAM, char **argv)
|
||||
}
|
||||
|
||||
/* Get SERVER_ID if present */
|
||||
- server_id_opt = udhcp_get_option(&packet, DHCP_SERVER_ID);
|
||||
+ server_id_opt = udhcp_get_option32(&packet, DHCP_SERVER_ID);
|
||||
if (server_id_opt) {
|
||||
uint32_t server_id_network_order;
|
||||
move_from_unaligned32(server_id_network_order, server_id_opt);
|
||||
@@ -1011,7 +1011,7 @@ int udhcpd_main(int argc UNUSED_PARAM, char **argv)
|
||||
}
|
||||
|
||||
/* Get REQUESTED_IP if present */
|
||||
- requested_ip_opt = udhcp_get_option(&packet, DHCP_REQUESTED_IP);
|
||||
+ requested_ip_opt = udhcp_get_option32(&packet, DHCP_REQUESTED_IP);
|
||||
if (requested_ip_opt) {
|
||||
move_from_unaligned32(requested_nip, requested_ip_opt);
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
commit 74d9f1ba37010face4bd1449df4d60dd84450b06
|
||||
Author: Denys Vlasenko <vda.linux@googlemail.com>
|
||||
Date: Mon Jan 7 15:33:42 2019 +0100
|
||||
|
||||
udhcpc: when decoding DHCP_SUBNET, ensure it is 4 bytes long
|
||||
|
||||
function old new delta
|
||||
udhcp_run_script 795 801 +6
|
||||
|
||||
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
||||
|
||||
diff --git networking/udhcp/common.c networking/udhcp/common.c
|
||||
index 4c2221b77..fc4de5716 100644
|
||||
--- networking/udhcp/common.c
|
||||
+++ networking/udhcp/common.c
|
||||
@@ -302,7 +302,7 @@ uint8_t* FAST_FUNC udhcp_get_option32(struct dhcp_packet *packet, int code)
|
||||
{
|
||||
uint8_t *r = udhcp_get_option(packet, code);
|
||||
if (r) {
|
||||
- if (r[-1] != 4)
|
||||
+ if (r[-OPT_DATA + OPT_LEN] != 4)
|
||||
r = NULL;
|
||||
}
|
||||
return r;
|
||||
diff --git networking/udhcp/common.h networking/udhcp/common.h
|
||||
index 9511152ff..62f9a2a4a 100644
|
||||
--- networking/udhcp/common.h
|
||||
+++ networking/udhcp/common.h
|
||||
@@ -119,7 +119,7 @@ enum {
|
||||
//#define DHCP_TIME_SERVER 0x04 /* RFC 868 time server (32-bit, 0 = 1.1.1900) */
|
||||
//#define DHCP_NAME_SERVER 0x05 /* IEN 116 _really_ ancient kind of NS */
|
||||
//#define DHCP_DNS_SERVER 0x06
|
||||
-//#define DHCP_LOG_SERVER 0x07 /* port 704 UDP log (not syslog)
|
||||
+//#define DHCP_LOG_SERVER 0x07 /* port 704 UDP log (not syslog) */
|
||||
//#define DHCP_COOKIE_SERVER 0x08 /* "quote of the day" server */
|
||||
//#define DHCP_LPR_SERVER 0x09
|
||||
#define DHCP_HOST_NAME 0x0c /* 12: either client informs server or server gives name to client */
|
||||
diff --git networking/udhcp/dhcpc.c networking/udhcp/dhcpc.c
|
||||
index 5b3fd531c..dcec8cdfd 100644
|
||||
--- networking/udhcp/dhcpc.c
|
||||
+++ networking/udhcp/dhcpc.c
|
||||
@@ -531,7 +531,7 @@ static char **fill_envp(struct dhcp_packet *packet)
|
||||
temp = udhcp_get_option(packet, code);
|
||||
*curr = xmalloc_optname_optval(temp, &dhcp_optflags[i], opt_name);
|
||||
putenv(*curr++);
|
||||
- if (code == DHCP_SUBNET) {
|
||||
+ if (code == DHCP_SUBNET && temp[-OPT_DATA + OPT_LEN] == 4) {
|
||||
/* Subnet option: make things like "$ip/$mask" possible */
|
||||
uint32_t subnet;
|
||||
move_from_unaligned32(subnet, temp);
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'busybox'
|
||||
pkgname=busybox
|
||||
version=1.29.3
|
||||
revision=2
|
||||
version=1.30.1
|
||||
revision=1
|
||||
hostmakedepends="perl"
|
||||
checkdepends="zip"
|
||||
short_desc="Swiss Army Knife of Embedded Linux"
|
||||
|
@ -9,24 +9,38 @@ maintainer="Juan RP <xtraeme@voidlinux.org>"
|
|||
license="GPL-2.0-only"
|
||||
homepage="http://www.busybox.net"
|
||||
distfiles="${homepage}/downloads/busybox-${version}.tar.bz2"
|
||||
checksum=97648636e579462296478e0218e65e4bc1e9cd69089a3b1aeb810bff7621efb7
|
||||
checksum=3d1d04a4dbd34048f4794815a5c48ebb9eb53c5277e09ffffc060323b95dfbdc
|
||||
|
||||
alternatives="
|
||||
_alternatives_common="
|
||||
awk:awk:/usr/bin/busybox
|
||||
hostname:hostname:/usr/bin/busybox
|
||||
sh:sh:/usr/bin/busybox
|
||||
vi:vi:/usr/bin/busybox
|
||||
logger:logger:/usr/bin/busybox"
|
||||
|
||||
alternatives="
|
||||
${_alternatives_common}
|
||||
ntpd:ntpd:/usr/bin/busybox
|
||||
ntpd:ntpd:/etc/sv/busybox-ntpd
|
||||
vi:vi:/usr/bin/busybox"
|
||||
ntpd:ntpd:/etc/sv/busybox-ntpd"
|
||||
|
||||
_patch_config() {
|
||||
local t="$1"
|
||||
shift
|
||||
while [ "$1" ]; do
|
||||
local p="$1"
|
||||
shift
|
||||
patch "${t}/.config" <"${FILESDIR}/dotconfig.d/${p}.patch"
|
||||
done
|
||||
}
|
||||
|
||||
do_configure() {
|
||||
mkdir -p src
|
||||
mv * src || true
|
||||
|
||||
local t
|
||||
for t in busybox busybox-static; do
|
||||
for t in busybox busybox-static busybox-core busybox-huge; do
|
||||
mkdir -p $t
|
||||
cp -f ${FILESDIR}/${t}.dotconfig ${t}/.config
|
||||
cp -f ${FILESDIR}/dotconfig ${t}/.config
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
*-musl) sed -i -e /CONFIG_FEATURE_VI_REGEX_SEARCH/s/y/n/ \
|
||||
|
@ -39,9 +53,16 @@ do_configure() {
|
|||
"s,\(CONFIG_CROSS_COMPILER_PREFIX\).*,\1=\"${XBPS_CROSS_TRIPLET}-\",g" \
|
||||
${t}/.config
|
||||
fi
|
||||
make -C $t KBUILD_SRC=${wrksrc}/src -f ${wrksrc}/src/Makefile prepare ${makejobs}
|
||||
done
|
||||
sed -i -e '/CONFIG_STATIC/ s/.*/CONFIG_STATIC=y/' busybox-static/.config
|
||||
|
||||
_patch_config busybox udhcpc ntpd
|
||||
_patch_config busybox-static udhcpc ntpd static
|
||||
_patch_config busybox-huge udhcpc ntpd httpd mdev sysklogd
|
||||
|
||||
for t in busybox-core busybox busybox-static busybox-huge; do
|
||||
make -C "${t}" KBUILD_SRC="${wrksrc}/src" -f "${wrksrc}/src/Makefile" prepare "${makejobs}"
|
||||
done
|
||||
|
||||
if [ "$SOURCE_DATE_EPOCH" ]; then
|
||||
# rewrite date with the one from the date wrapper.
|
||||
d=$(date +"%F %T %Z")
|
||||
|
@ -50,31 +71,23 @@ do_configure() {
|
|||
}
|
||||
|
||||
do_build() {
|
||||
make -C busybox SKIP_STRIP=y ${makejobs}
|
||||
make -C busybox-static SKIP_STRIP=y ${makejobs}
|
||||
for t in busybox-core busybox busybox-static busybox-huge; do
|
||||
make -C "${t}" SKIP_STRIP=y "${makejobs}"
|
||||
done
|
||||
}
|
||||
|
||||
do_check() {
|
||||
# Copy the testsuite into the busybox and it's static counterpart
|
||||
# directory
|
||||
cp -r src/testsuite busybox
|
||||
cp -r src/testsuite busybox-static
|
||||
|
||||
# This is required by the testsuite
|
||||
cp src/scripts/echo.c busybox/scripts
|
||||
cp src/scripts/echo.c busybox-static/scripts
|
||||
|
||||
# Run testsuite for busybox
|
||||
for t in busybox-core busybox busybox-static busybox-huge; do
|
||||
# Copy the testsuite over
|
||||
cp -r src/testsuite "${t}"
|
||||
# Required by the testsuite
|
||||
cp src/scripts/echo.c "${t}/scripts"
|
||||
# Run the testsuite
|
||||
(
|
||||
cd busybox/testsuite
|
||||
SKIP_KNOWN_BUGS=yes ./runtest -v
|
||||
)
|
||||
|
||||
# Run testsuite for busybox-static
|
||||
(
|
||||
cd busybox-static/testsuite
|
||||
cd "${t}"
|
||||
SKIP_KNOWN_BUGS=yes ./runtest -v
|
||||
)
|
||||
done
|
||||
}
|
||||
|
||||
do_install() {
|
||||
|
@ -83,9 +96,30 @@ do_install() {
|
|||
vsv busybox-ntpd
|
||||
}
|
||||
|
||||
busybox-core_package() {
|
||||
short_desc+=" (essential applets)"
|
||||
conflicts="busybox>=0 busybox-huge>=0"
|
||||
alternatives="${_alternatives_common}"
|
||||
pkg_install() {
|
||||
vbin busybox-core/busybox_unstripped busybox
|
||||
vman busybox-core/docs/busybox.1
|
||||
}
|
||||
}
|
||||
|
||||
busybox-static_package() {
|
||||
short_desc+=" (statically linked)"
|
||||
pkg_install() {
|
||||
vbin busybox-static/busybox busybox.static
|
||||
}
|
||||
}
|
||||
|
||||
busybox-huge_package() {
|
||||
short_desc+=" (extra applets)"
|
||||
conflicts="busybox>=0 busybox-core>=0"
|
||||
pkg_install() {
|
||||
vbin busybox-huge/busybox_unstripped busybox
|
||||
vman busybox-huge/docs/busybox.1
|
||||
vsv busybox-syslogd
|
||||
vsv busybox-klogd
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue