aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--networking/zcip.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/networking/zcip.c b/networking/zcip.c
index 129155fe5..ef9aa2186 100644
--- a/networking/zcip.c
+++ b/networking/zcip.c
@@ -177,7 +177,6 @@ int zcip_main(int argc, char **argv)
177{ 177{
178 int state = PROBE; 178 int state = PROBE;
179 struct ether_addr eth_addr; 179 struct ether_addr eth_addr;
180 const char *why;
181 char *r_opt; 180 char *r_opt;
182 unsigned opts; 181 unsigned opts;
183 182
@@ -319,8 +318,6 @@ int zcip_main(int argc, char **argv)
319 VDBG("...wait %d %s nprobes=%u, nclaims=%u\n", 318 VDBG("...wait %d %s nprobes=%u, nclaims=%u\n",
320 timeout_ms, intf, nprobes, nclaims); 319 timeout_ms, intf, nprobes, nclaims);
321 320
322 // FIXME: do we really receive ALL packets here??
323 // if yes, set up filtering to get ARPs only!!! (see arping)
324 switch (safe_poll(fds, 1, timeout_ms)) { 321 switch (safe_poll(fds, 1, timeout_ms)) {
325 322
326 default: 323 default:
@@ -447,8 +444,7 @@ int zcip_main(int argc, char **argv)
447 444
448 // read ARP packet 445 // read ARP packet
449 if (safe_read(sock_fd, &p, sizeof(p)) < 0) { 446 if (safe_read(sock_fd, &p, sizeof(p)) < 0) {
450 why = "recv"; 447 bb_perror_msg_and_die(bb_msg_read_error);
451 goto bad;
452 } 448 }
453 if (p.eth.ether_type != htons(ETHERTYPE_ARP)) 449 if (p.eth.ether_type != htons(ETHERTYPE_ARP))
454 continue; 450 continue;
@@ -550,7 +546,4 @@ int zcip_main(int argc, char **argv)
550 break; // case 1 (packets arriving) 546 break; // case 1 (packets arriving)
551 } // switch poll 547 } // switch poll
552 } // while (1) 548 } // while (1)
553 bad:
554 bb_perror_msg("%s: %s", intf, why);
555 return EXIT_FAILURE;
556} 549}