aboutgitcodebugslistschat
path: root/arp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arp.c')
-rw-r--r--arp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arp.c b/arp.c
index b5af49f..3195692 100644
--- a/arp.c
+++ b/arp.c
@@ -58,7 +58,8 @@ int arp(struct ctx *c, struct ethhdr *eh, size_t len)
/* Discard announcements (but not 0.0.0.0 "probes"): we might have the
* same IP address, hide that.
*/
- if (*((uint32_t *)&am->sip) && !memcmp(am->sip, am->tip, 4))
+ if (memcmp(am->sip, (unsigned char[4]){ 0, 0, 0, 0 }, 4) &&
+ !memcmp(am->sip, am->tip, 4))
return 1;
/* Don't resolve our own address, either. */