diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2022-12-15 11:51:16 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2022-12-15 11:51:16 +0100 |
commit | 242d0562307549af61b234bff545ca13474a2603 (patch) | |
tree | bd6f1c917f58c5481cec08025987f7471a4fb371 | |
parent | 301ef96892939498ceb0a70e1f523ba9a7a7b9c1 (diff) | |
download | busybox-w32-242d0562307549af61b234bff545ca13474a2603.tar.gz busybox-w32-242d0562307549af61b234bff545ca13474a2603.tar.bz2 busybox-w32-242d0562307549af61b234bff545ca13474a2603.zip |
udhcpc6: use a different default config script
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | networking/udhcp/Config.src | 7 | ||||
-rw-r--r-- | networking/udhcp/d6_dhcpc.c | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/networking/udhcp/Config.src b/networking/udhcp/Config.src index 8c8c11c26..7ba7f48fc 100644 --- a/networking/udhcp/Config.src +++ b/networking/udhcp/Config.src | |||
@@ -92,12 +92,17 @@ config FEATURE_UDHCPC_SANITIZEOPT | |||
92 | config UDHCPC_DEFAULT_SCRIPT | 92 | config UDHCPC_DEFAULT_SCRIPT |
93 | string "Absolute path to config script" | 93 | string "Absolute path to config script" |
94 | default "/usr/share/udhcpc/default.script" | 94 | default "/usr/share/udhcpc/default.script" |
95 | depends on UDHCPC || UDHCPC6 | 95 | depends on UDHCPC |
96 | help | 96 | help |
97 | This script is called after udhcpc receives an answer. See | 97 | This script is called after udhcpc receives an answer. See |
98 | examples/udhcp for a working example. Normally it is safe | 98 | examples/udhcp for a working example. Normally it is safe |
99 | to leave this untouched. | 99 | to leave this untouched. |
100 | 100 | ||
101 | config UDHCPC6_DEFAULT_SCRIPT | ||
102 | string "Absolute path to config script for IPv6" | ||
103 | default "/usr/share/udhcpc/default6.script" | ||
104 | depends on UDHCPC6 | ||
105 | |||
101 | # udhcpc6 config is inserted here: | 106 | # udhcpc6 config is inserted here: |
102 | INSERT | 107 | INSERT |
103 | 108 | ||
diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c index e49d752e6..cdd06188e 100644 --- a/networking/udhcp/d6_dhcpc.c +++ b/networking/udhcp/d6_dhcpc.c | |||
@@ -1134,7 +1134,7 @@ static void client_background(void) | |||
1134 | //usage:#define udhcpc6_full_usage "\n" | 1134 | //usage:#define udhcpc6_full_usage "\n" |
1135 | //usage: "\n -i IFACE Interface to use (default "CONFIG_UDHCPC_DEFAULT_INTERFACE")" | 1135 | //usage: "\n -i IFACE Interface to use (default "CONFIG_UDHCPC_DEFAULT_INTERFACE")" |
1136 | //usage: "\n -p FILE Create pidfile" | 1136 | //usage: "\n -p FILE Create pidfile" |
1137 | //usage: "\n -s PROG Run PROG at DHCP events (default "CONFIG_UDHCPC_DEFAULT_SCRIPT")" | 1137 | //usage: "\n -s PROG Run PROG at DHCP events (default "CONFIG_UDHCPC6_DEFAULT_SCRIPT")" |
1138 | //usage: "\n -B Request broadcast replies" | 1138 | //usage: "\n -B Request broadcast replies" |
1139 | //usage: "\n -t N Send up to N discover packets" | 1139 | //usage: "\n -t N Send up to N discover packets" |
1140 | //usage: "\n -T SEC Pause between packets (default 3)" | 1140 | //usage: "\n -T SEC Pause between packets (default 3)" |
@@ -1200,7 +1200,7 @@ int udhcpc6_main(int argc UNUSED_PARAM, char **argv) | |||
1200 | IF_FEATURE_UDHCP_PORT(SERVER_PORT6 = 547;) | 1200 | IF_FEATURE_UDHCP_PORT(SERVER_PORT6 = 547;) |
1201 | IF_FEATURE_UDHCP_PORT(CLIENT_PORT6 = 546;) | 1201 | IF_FEATURE_UDHCP_PORT(CLIENT_PORT6 = 546;) |
1202 | client_data.interface = CONFIG_UDHCPC_DEFAULT_INTERFACE; | 1202 | client_data.interface = CONFIG_UDHCPC_DEFAULT_INTERFACE; |
1203 | client_data.script = CONFIG_UDHCPC_DEFAULT_SCRIPT; | 1203 | client_data.script = CONFIG_UDHCPC6_DEFAULT_SCRIPT; |
1204 | client_data.sockfd = -1; | 1204 | client_data.sockfd = -1; |
1205 | 1205 | ||
1206 | /* Make sure fd 0,1,2 are open */ | 1206 | /* Make sure fd 0,1,2 are open */ |