summaryrefslogtreecommitdiffstats
path: root/arp.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-03-29 08:40:55 +0000
committerRoy Marples <roy@marples.name>2008-03-29 08:40:55 +0000
commit453072ef8fa4589a255f797c7fdc64fccb775e5f (patch)
treeac97ea86af5eea0b05e1d043be9fce764b05a0cd /arp.c
parentf57164233dfc48c62679106c8c870bc88119885b (diff)
downloaddhcpcd-453072ef8fa4589a255f797c7fdc64fccb775e5f.tar.xz
Rework our error handling code a little to save ~5k on x86_64
Diffstat (limited to 'arp.c')
-rw-r--r--arp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arp.c b/arp.c
index 399af0c7..3db15580 100644
--- a/arp.c
+++ b/arp.c
@@ -106,6 +106,8 @@ send_arp(const struct interface *iface, int op, struct in_addr sip,
retval = send_packet(iface, ETHERTYPE_ARP,
(unsigned char *) arp, arphdr_len(arp));
+ if (retval == -1)
+ logger(LOG_ERR,"send_packet: %s", strerror(errno));
free(arp);
return retval;
}
@@ -150,8 +152,10 @@ arp_claim(struct interface *iface, struct in_addr address)
"checking %s is available on attached networks",
inet_ntoa(address));
- if (!open_socket(iface, ETHERTYPE_ARP))
+ if (!open_socket(iface, ETHERTYPE_ARP)) {
+ logger (LOG_ERR, "open_socket: %s", strerror(errno));
return -1;
+ }
fds[0].fd = signal_fd();
fds[1].fd = iface->fd;