aboutgitcodebugslistschat
path: root/arp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arp.c')
-rw-r--r--arp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arp.c b/arp.c
index 33b03cf..bb042e9 100644
--- a/arp.c
+++ b/arp.c
@@ -168,6 +168,9 @@ void arp_announce(const struct ctx *c, struct in_addr *ip,
struct arpmsg am;
} __attribute__((__packed__)) msg;
+ if (!tap_is_ready(c))
+ return;
+
/* Ethernet header */
msg.eh.h_proto = htons(ETH_P_ARP);
memcpy(msg.eh.h_dest, MAC_BROADCAST, sizeof(msg.eh.h_dest));