summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rarpd
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-01-16 06:39:28 +0000
committerderaadt <deraadt@openbsd.org>2015-01-16 06:39:28 +0000
commitb9fc9a728fce9c4289b7e9a992665e28d5629a54 (patch)
tree72b2433e418dfa1aef5fcf8305617b97979a25d8 /usr.sbin/rarpd
parentimprove checksum parsing slightly. now handles filenames with spaces. (diff)
downloadwireguard-openbsd-b9fc9a728fce9c4289b7e9a992665e28d5629a54.tar.xz
wireguard-openbsd-b9fc9a728fce9c4289b7e9a992665e28d5629a54.zip
Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
Diffstat (limited to 'usr.sbin/rarpd')
-rw-r--r--usr.sbin/rarpd/arptab.c3
-rw-r--r--usr.sbin/rarpd/rarpd.c23
2 files changed, 13 insertions, 13 deletions
diff --git a/usr.sbin/rarpd/arptab.c b/usr.sbin/rarpd/arptab.c
index 87fd7686faf..c713805cf13 100644
--- a/usr.sbin/rarpd/arptab.c
+++ b/usr.sbin/rarpd/arptab.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arptab.c,v 1.22 2013/11/12 19:49:42 deraadt Exp $ */
+/* $OpenBSD: arptab.c,v 1.23 2015/01/16 06:40:19 deraadt Exp $ */
/*
* Copyright (c) 1984, 1993
@@ -37,7 +37,6 @@
*/
-#include <sys/param.h>
#include <sys/file.h>
#include <sys/socket.h>
#include <sys/sysctl.h>
diff --git a/usr.sbin/rarpd/rarpd.c b/usr.sbin/rarpd/rarpd.c
index 98360e0b3c8..61e96b2ae9d 100644
--- a/usr.sbin/rarpd/rarpd.c
+++ b/usr.sbin/rarpd/rarpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rarpd.c,v 1.57 2014/12/16 03:35:49 millert Exp $ */
+/* $OpenBSD: rarpd.c,v 1.58 2015/01/16 06:40:19 deraadt Exp $ */
/* $NetBSD: rarpd.c,v 1.25 1998/04/23 02:48:33 mrg Exp $ */
/*
@@ -26,23 +26,24 @@
* rarpd - Reverse ARP Daemon
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <syslog.h>
-#include <string.h>
-#include <stdarg.h>
-#include <sys/param.h>
-#include <unistd.h>
#include <sys/time.h>
-#include <net/bpf.h>
+#include <sys/file.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
+#include <net/bpf.h>
#include <net/if.h>
#include <net/if_dl.h>
#include <net/if_types.h>
#include <netinet/in.h>
#include <netinet/if_ether.h>
-#include <sys/file.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <syslog.h>
+#include <string.h>
+#include <stdarg.h>
+#include <unistd.h>
+#include <limits.h>
#include <errno.h>
#include <netdb.h>
#include <arpa/inet.h>
@@ -518,7 +519,7 @@ choose_ipaddr(u_int32_t **alist, u_int32_t net, u_int32_t netmask)
void
rarp_process(struct if_info *ii, u_char *pkt)
{
- char ename[MAXHOSTNAMELEN];
+ char ename[HOST_NAME_MAX+1];
u_int32_t target_ipaddr;
struct ether_header *ep;
struct ether_addr *ea;