summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2022-12-15 11:51:16 +0100
committerDenys Vlasenko2022-12-15 11:51:16 +0100
commit242d0562307549af61b234bff545ca13474a2603 (patch)
treebd6f1c917f58c5481cec08025987f7471a4fb371
parent301ef96892939498ceb0a70e1f523ba9a7a7b9c1 (diff)
downloadbusybox-242d0562307549af61b234bff545ca13474a2603.zip
busybox-242d0562307549af61b234bff545ca13474a2603.tar.gz
udhcpc6: use a different default config script
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/udhcp/Config.src7
-rw-r--r--networking/udhcp/d6_dhcpc.c4
2 files changed, 8 insertions, 3 deletions
diff --git a/networking/udhcp/Config.src b/networking/udhcp/Config.src
index 8c8c11c..7ba7f48 100644
--- a/networking/udhcp/Config.src
+++ b/networking/udhcp/Config.src
@@ -92,12 +92,17 @@ config FEATURE_UDHCPC_SANITIZEOPT
config UDHCPC_DEFAULT_SCRIPT
string "Absolute path to config script"
default "/usr/share/udhcpc/default.script"
- depends on UDHCPC || UDHCPC6
+ depends on UDHCPC
help
This script is called after udhcpc receives an answer. See
examples/udhcp for a working example. Normally it is safe
to leave this untouched.
+config UDHCPC6_DEFAULT_SCRIPT
+ string "Absolute path to config script for IPv6"
+ default "/usr/share/udhcpc/default6.script"
+ depends on UDHCPC6
+
# udhcpc6 config is inserted here:
INSERT
diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
index e49d752..cdd0618 100644
--- a/networking/udhcp/d6_dhcpc.c
+++ b/networking/udhcp/d6_dhcpc.c
@@ -1134,7 +1134,7 @@ static void client_background(void)
//usage:#define udhcpc6_full_usage "\n"
//usage: "\n -i IFACE Interface to use (default "CONFIG_UDHCPC_DEFAULT_INTERFACE")"
//usage: "\n -p FILE Create pidfile"
-//usage: "\n -s PROG Run PROG at DHCP events (default "CONFIG_UDHCPC_DEFAULT_SCRIPT")"
+//usage: "\n -s PROG Run PROG at DHCP events (default "CONFIG_UDHCPC6_DEFAULT_SCRIPT")"
//usage: "\n -B Request broadcast replies"
//usage: "\n -t N Send up to N discover packets"
//usage: "\n -T SEC Pause between packets (default 3)"
@@ -1200,7 +1200,7 @@ int udhcpc6_main(int argc UNUSED_PARAM, char **argv)
IF_FEATURE_UDHCP_PORT(SERVER_PORT6 = 547;)
IF_FEATURE_UDHCP_PORT(CLIENT_PORT6 = 546;)
client_data.interface = CONFIG_UDHCPC_DEFAULT_INTERFACE;
- client_data.script = CONFIG_UDHCPC_DEFAULT_SCRIPT;
+ client_data.script = CONFIG_UDHCPC6_DEFAULT_SCRIPT;
client_data.sockfd = -1;
/* Make sure fd 0,1,2 are open */