From: Joseph C. Lehner Date: Thu, 23 Feb 2017 17:29:55 +0000 (+0100) Subject: Log bogus NMRP responses X-Git-Tag: v0.9.11~8 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6ed895d4c7933ca9494e1e164e0ec2c05a5628e3;p=oweals%2Fnmrpflash.git Log bogus NMRP responses --- diff --git a/nmrp.c b/nmrp.c index 1f197ea..722fe75 100644 --- a/nmrp.c +++ b/nmrp.c @@ -488,8 +488,14 @@ int nmrp_do(struct nmrpd_args *args) } status = pkt_recv(sock, &rx); - if (status == 0 && memcmp(rx.eh.ether_dhost, src, 6) == 0) { - break; + if (status == 0) { + 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) { goto out; } else {