{
int state = PROBE;
struct ether_addr eth_addr;
- const char *why;
char *r_opt;
unsigned opts;
VDBG("...wait %d %s nprobes=%u, nclaims=%u\n",
timeout_ms, intf, nprobes, nclaims);
- // FIXME: do we really receive ALL packets here??
- // if yes, set up filtering to get ARPs only!!! (see arping)
switch (safe_poll(fds, 1, timeout_ms)) {
default:
// read ARP packet
if (safe_read(sock_fd, &p, sizeof(p)) < 0) {
- why = "recv";
- goto bad;
+ bb_perror_msg_and_die(bb_msg_read_error);
}
if (p.eth.ether_type != htons(ETHERTYPE_ARP))
continue;
break; // case 1 (packets arriving)
} // switch poll
} // while (1)
- bad:
- bb_perror_msg("%s: %s", intf, why);
- return EXIT_FAILURE;
}