Log bogus NMRP responses
This commit is contained in:
parent
64c129bd83
commit
6ed895d4c7
1 changed files with 8 additions and 2 deletions
10
nmrp.c
10
nmrp.c
|
|
@ -488,8 +488,14 @@ int nmrp_do(struct nmrpd_args *args)
|
||||||
}
|
}
|
||||||
|
|
||||||
status = pkt_recv(sock, &rx);
|
status = pkt_recv(sock, &rx);
|
||||||
if (status == 0 && memcmp(rx.eh.ether_dhost, src, 6) == 0) {
|
if (status == 0) {
|
||||||
break;
|
if (memcmp(rx.eh.ether_dhost, src, 6) == 0) {
|
||||||
|
break;
|
||||||
|
} else if (verbosity) {
|
||||||
|
printf("\nIgnoring bogus response: %s -> %s.\n",
|
||||||
|
mac_to_str(rx.eh.ether_shost),
|
||||||
|
mac_to_str(rx.eh.ether_dhost));
|
||||||
|
}
|
||||||
} else if (status == 1) {
|
} else if (status == 1) {
|
||||||
goto out;
|
goto out;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue