aboutgitcodebugslistschat
path: root/arp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arp.c')
-rw-r--r--arp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arp.c b/arp.c
index 141d43f..930b9ea 100644
--- a/arp.c
+++ b/arp.c
@@ -24,6 +24,7 @@
#include <string.h>
#include "util.h"
+#include "log.h"
#include "arp.h"
#include "dhcp.h"
#include "passt.h"
@@ -43,6 +44,7 @@ int arp(const struct ctx *c, const struct pool *p)
struct arphdr *ah;
struct arpmsg *am;
size_t len;
+ int ret;
eh = packet_get(p, 0, 0, sizeof(*eh), NULL);
ah = packet_get(p, 0, sizeof(*eh), sizeof(*ah), NULL);
@@ -81,8 +83,8 @@ int arp(const struct ctx *c, const struct pool *p)
memcpy(eh->h_dest, eh->h_source, sizeof(eh->h_dest));
memcpy(eh->h_source, c->mac, sizeof(eh->h_source));
- if (tap_send(c, eh, len) < 0)
- perror("ARP: send");
+ if ((ret = tap_send(c, eh, len)) < 0)
+ warn("ARP: send: %s", strerror(ret));
return 1;
}