xsetenv("ip", addr);
fmt -= 3;
}
- bb_info_msg(fmt, argv[2], argv[0], addr);
+ bb_error_msg(fmt, argv[2], argv[0], addr);
status = spawn_and_wait(argv + 1);
if (status < 0) {
#if BB_MMU
bb_daemonize(0 /*was: DAEMON_CHDIR_ROOT*/);
#endif
- bb_info_msg("start, interface %s", argv_intf);
+ bb_error_msg("start, interface %s", argv_intf);
}
// Run the dynamic address negotiation protocol,
state = PROBE;
while (1) {
struct pollfd fds[1];
- unsigned deadline_us;
+ unsigned deadline_us = deadline_us;
struct arp_packet p;
int ip_conflict;
int n;
// make the kernel filter out all packets except
// ones we'd care about.
}
- // Set deadline_us to the point in time when we timeout
- deadline_us = MONOTONIC_US() + timeout_ms * 1000;
+ if (timeout_ms >= 0) {
+ // Set deadline_us to the point in time when we timeout
+ deadline_us = MONOTONIC_US() + timeout_ms * 1000;
+ }
VDBG("...wait %d %s nsent=%u\n",
timeout_ms, argv_intf, nsent);
send_arp_request(0, &null_ethaddr, chosen_nip);
continue;
}
- // Switch to announce state
+ // Switch to announce state
nsent = 0;
state = ANNOUNCE;
goto send_announce;