aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2019-03-12 13:47:44 +0000
committerRon Yorston <rmy@pobox.com>2019-03-12 13:47:44 +0000
commitfd0e6a01a68047e959ef13f3161ce302b438d2b1 (patch)
treec9f15afd1220835af46ddf8e72c077c80edbf005 /networking
parentdb255bbadf9c6b219b29d06d4958fbd7967eb8b4 (diff)
parent2452247ea33c1c70263bf4cbc11b3170366ff2ea (diff)
downloadbusybox-w32-fd0e6a01a68047e959ef13f3161ce302b438d2b1.tar.gz
busybox-w32-fd0e6a01a68047e959ef13f3161ce302b438d2b1.tar.bz2
busybox-w32-fd0e6a01a68047e959ef13f3161ce302b438d2b1.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'networking')
-rw-r--r--networking/ntpd.c9
-rw-r--r--networking/udhcp/d6_dhcpc.c8
-rw-r--r--networking/udhcp/dhcpc.c14
3 files changed, 21 insertions, 10 deletions
diff --git a/networking/ntpd.c b/networking/ntpd.c
index 855815ece..0f474bc09 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -177,12 +177,11 @@
177 */ 177 */
178#define STEP_THRESHOLD 1 178#define STEP_THRESHOLD 1
179/* Slew threshold (sec): adjtimex() won't accept offsets larger than this. 179/* Slew threshold (sec): adjtimex() won't accept offsets larger than this.
180 * Using exact power of 2 (1/8) results in smaller code 180 * Using exact power of 2 (1/8, 1/2 etc) results in smaller code
181 */ 181 */
182#define SLEW_THRESHOLD 0.125 182#define SLEW_THRESHOLD 0.5
183//^^^^^^^^^^^^^^^^^^^^^^^^^^ TODO: man adjtimex about tmx.offset: 183// ^^^^ used to be 0.125.
184// "Since Linux 2.6.26, the supplied value is clamped to the range (-0.5s, +0.5s)" 184// Since Linux 2.6.26 (circa 2006), kernel accepts (-0.5s, +0.5s) range
185// - can use this larger value instead?
186 185
187/* Stepout threshold (sec). std ntpd uses 900 (11 mins (!)) */ 186/* Stepout threshold (sec). std ntpd uses 900 (11 mins (!)) */
188//UNUSED: #define WATCH_THRESHOLD 128 187//UNUSED: #define WATCH_THRESHOLD 128
diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
index 38c91cbb4..8a4a4b7a5 100644
--- a/networking/udhcp/d6_dhcpc.c
+++ b/networking/udhcp/d6_dhcpc.c
@@ -1370,7 +1370,13 @@ int udhcpc6_main(int argc UNUSED_PARAM, char **argv)
1370 bb_error_msg("no lease, forking to background"); 1370 bb_error_msg("no lease, forking to background");
1371 client_background(); 1371 client_background();
1372 /* do not background again! */ 1372 /* do not background again! */
1373 opt = ((opt & ~OPT_b) | OPT_f); 1373 opt = ((opt & ~(OPT_b|OPT_n)) | OPT_f);
1374 /* ^^^ also disables -n (-b takes priority over -n):
1375 * ifup's default udhcpc options are -R -n,
1376 * and users want to be able to add -b
1377 * (in a config file) to make it background
1378 * _and not exit_.
1379 */
1374 } else 1380 } else
1375#endif 1381#endif
1376 if (opt & OPT_n) { /* abort if no lease */ 1382 if (opt & OPT_n) { /* abort if no lease */
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index dcec8cdfd..e2fb18aba 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -1209,13 +1209,13 @@ static void client_background(void)
1209//usage: "\n -t N Send up to N discover packets (default 3)" 1209//usage: "\n -t N Send up to N discover packets (default 3)"
1210//usage: "\n -T SEC Pause between packets (default 3)" 1210//usage: "\n -T SEC Pause between packets (default 3)"
1211//usage: "\n -A SEC Wait if lease is not obtained (default 20)" 1211//usage: "\n -A SEC Wait if lease is not obtained (default 20)"
1212//usage: USE_FOR_MMU(
1213//usage: "\n -b Background if lease is not obtained"
1214//usage: )
1212//usage: "\n -n Exit if lease is not obtained" 1215//usage: "\n -n Exit if lease is not obtained"
1213//usage: "\n -q Exit after obtaining lease" 1216//usage: "\n -q Exit after obtaining lease"
1214//usage: "\n -R Release IP on exit" 1217//usage: "\n -R Release IP on exit"
1215//usage: "\n -f Run in foreground" 1218//usage: "\n -f Run in foreground"
1216//usage: USE_FOR_MMU(
1217//usage: "\n -b Background if lease is not obtained"
1218//usage: )
1219//usage: "\n -S Log to syslog too" 1219//usage: "\n -S Log to syslog too"
1220//usage: IF_FEATURE_UDHCPC_ARPING( 1220//usage: IF_FEATURE_UDHCPC_ARPING(
1221//usage: "\n -a[MSEC] Validate offered address with ARP ping" 1221//usage: "\n -a[MSEC] Validate offered address with ARP ping"
@@ -1484,7 +1484,13 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
1484 bb_error_msg("no lease, forking to background"); 1484 bb_error_msg("no lease, forking to background");
1485 client_background(); 1485 client_background();
1486 /* do not background again! */ 1486 /* do not background again! */
1487 opt = ((opt & ~OPT_b) | OPT_f); 1487 opt = ((opt & ~(OPT_b|OPT_n)) | OPT_f);
1488 /* ^^^ also disables -n (-b takes priority over -n):
1489 * ifup's default udhcpc options are -R -n,
1490 * and users want to be able to add -b
1491 * (in a config file) to make it background
1492 * _and not exit_.
1493 */
1488 } else 1494 } else
1489#endif 1495#endif
1490 if (opt & OPT_n) { /* abort if no lease */ 1496 if (opt & OPT_n) { /* abort if no lease */