Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Busybox: Enable IPv6 and some applets #22431

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions packages/busybox/0015-fix-ipv6.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- ./networking/ifconfig.c.orig 2024-11-30 16:55:37.222317063 +0800
+++ ./networking/ifconfig.c 2024-11-30 16:57:46.706317014 +0800
@@ -127,7 +127,7 @@
# define IFF_DYNAMIC 0x8000 /* dialup device with changing addresses */
#endif

-#if ENABLE_FEATURE_IPV6
+#ifdef FORCE_IN6_IFREQ
struct in6_ifreq {
struct in6_addr ifr6_addr;
uint32_t ifr6_prefixlen;
31 changes: 31 additions & 0 deletions packages/busybox/0016-fix-ipv6-2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
--- ./networking/interface.c.orig 2024-11-30 18:15:36.609159072 +0800
+++ ./networking/interface.c 2024-11-30 18:18:04.293159016 +0800
@@ -53,18 +53,19 @@
#define _PATH_PROCNET_DEV "/proc/net/dev"
#define _PATH_PROCNET_IFINET6 "/proc/net/if_inet6"

-#ifdef HAVE_AFINET6
-# ifndef _LINUX_IN6_H
+// disabled because of conflict with Android NDK.
+//#ifdef HAVE_AFINET6
+//# ifndef _LINUX_IN6_H
/*
* This is from linux/include/net/ipv6.h
*/
-struct in6_ifreq {
- struct in6_addr ifr6_addr;
- uint32_t ifr6_prefixlen;
- unsigned int ifr6_ifindex;
-};
-# endif
-#endif /* HAVE_AFINET6 */
+//struct in6_ifreq {
+// struct in6_addr ifr6_addr;
+// uint32_t ifr6_prefixlen;
+// unsigned int ifr6_ifindex;
+//};
+//# endif
+//#endif /* HAVE_AFINET6 */

/* Defines for glibc2.0 users. */
#ifndef SIOCSIFTXQLEN
2 changes: 1 addition & 1 deletion packages/busybox/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Tiny versions of many common UNIX utilities into a singl
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.36.1
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://busybox.net/downloads/busybox-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=b8cc24c9574d809e7279c3be349795c5d5ceb6fdf19ca709f80cde50e47de314
TERMUX_PKG_BUILD_IN_SRC=true
Expand Down
26 changes: 13 additions & 13 deletions packages/busybox/busybox.config
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
CONFIG_FEATURE_DD_THIRD_STATUS_LINE=y
CONFIG_FEATURE_DD_IBS_OBS=y
CONFIG_FEATURE_DD_STATUS=y
# CONFIG_DF is not set
CONFIG_DF=y
# CONFIG_FEATURE_DF_FANCY is not set
# CONFIG_FEATURE_SKIP_ROOTFS is not set
CONFIG_DIRNAME=y
Expand Down Expand Up @@ -559,7 +559,7 @@ CONFIG_FEATURE_DEFAULT_PASSWD_ALGO=""
# Linux Ext2 FS Progs
#
CONFIG_CHATTR=y
# CONFIG_FSCK is not set
CONFIG_FSCK=y
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is fsck useful on Android?
I'm also assuming it would require root privileges.

CONFIG_LSATTR=y
CONFIG_TUNE2FS=y

Expand Down Expand Up @@ -856,7 +856,7 @@ CONFIG_TTYSIZE=y
#
# Networking Utilities
#
# CONFIG_FEATURE_IPV6 is not set
CONFIG_FEATURE_IPV6=y
CONFIG_FEATURE_UNIX_LOCAL=y
# CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set
CONFIG_VERBOSE_RESOLUTION_ERRORS=y
Expand Down Expand Up @@ -905,8 +905,8 @@ CONFIG_FEATURE_IFCONFIG_HW=y
CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
# CONFIG_IFENSLAVE is not set
# CONFIG_IFPLUGD is not set
# CONFIG_IFUP is not set
# CONFIG_IFDOWN is not set
CONFIG_IFUP=y
CONFIG_IFDOWN=y
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IFUP and IFDOWN won't work without root access, right?

CONFIG_IFUPDOWN_IFSTATE_PATH=""
# CONFIG_FEATURE_IFUPDOWN_IP is not set
# CONFIG_FEATURE_IFUPDOWN_IPV4 is not set
Expand Down Expand Up @@ -953,12 +953,12 @@ CONFIG_FEATURE_NETSTAT_PRG=y
# CONFIG_NSLOOKUP is not set
# CONFIG_FEATURE_NSLOOKUP_BIG is not set
# CONFIG_FEATURE_NSLOOKUP_LONG_OPTIONS is not set
# CONFIG_NTPD is not set
CONFIG_NTPD=y
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would ntpd even work on Android?

# 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 is not set
CONFIG_PING6=y
CONFIG_FEATURE_FANCY_PING=y
CONFIG_PSCAN=y
CONFIG_ROUTE=y
Expand Down Expand Up @@ -986,7 +986,7 @@ CONFIG_FEATURE_TFTP_BLOCKSIZE=y
# CONFIG_TFTP_DEBUG is not set
# CONFIG_TLS is not set
CONFIG_TRACEROUTE=y
# CONFIG_TRACEROUTE6 is not set
CONFIG_TRACEROUTE6=y
CONFIG_FEATURE_TRACEROUTE_VERBOSE=y
CONFIG_FEATURE_TRACEROUTE_USE_ICMP=y
CONFIG_TUNCTL=y
Expand All @@ -1002,22 +1002,22 @@ CONFIG_FEATURE_WGET_TIMEOUT=y
# CONFIG_FEATURE_WGET_OPENSSL is not set
CONFIG_WHOIS=y
# CONFIG_ZCIP is not set
# CONFIG_UDHCPD is not set
CONFIG_UDHCPD=y
TomJo2000 marked this conversation as resolved.
Show resolved Hide resolved
# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set
# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set
CONFIG_DHCPD_LEASES_FILE=""
# CONFIG_DUMPLEASES is not set
# CONFIG_DHCPRELAY is not set
# CONFIG_UDHCPC is not set
CONFIG_UDHCPC=y
# CONFIG_FEATURE_UDHCPC_ARPING is not set
# CONFIG_FEATURE_UDHCPC_SANITIZEOPT is not set
CONFIG_UDHCPC_DEFAULT_SCRIPT=""
CONFIG_UDHCPC6_DEFAULT_SCRIPT=""
# CONFIG_UDHCPC6 is not set
# CONFIG_FEATURE_UDHCPC6_RFC3646 is not set
CONFIG_UDHCPC6=y
CONFIG_FEATURE_UDHCPC6_RFC3646=y
# CONFIG_FEATURE_UDHCPC6_RFC4704 is not set
# CONFIG_FEATURE_UDHCPC6_RFC4833 is not set
# CONFIG_FEATURE_UDHCPC6_RFC5970 is not set
CONFIG_FEATURE_UDHCPC6_RFC5970=y
CONFIG_UDHCPC_DEFAULT_INTERFACE=""
# CONFIG_FEATURE_UDHCP_PORT is not set
CONFIG_UDHCP_DEBUG=0
Expand Down
Loading