summaryrefslogtreecommitdiff
path: root/usr.sbin/arp/arp.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1997-11-28 05:34:42 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1997-11-28 05:34:42 +0000
commitc4ef3d729f37d79e93343f1bce5c2201b6d425bb (patch)
treea58bb114dde300d4e5c5b5347a828f34ff09e500 /usr.sbin/arp/arp.c
parent4128e7c559787c2acabab9b7d4ca7808560ce17a (diff)
I'm amazed that noone has ever misspelled the ethernet address when
doing an arp -s. Well I was the first. ;)
Diffstat (limited to 'usr.sbin/arp/arp.c')
-rw-r--r--usr.sbin/arp/arp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c
index 1955b600586..fb7ff267997 100644
--- a/usr.sbin/arp/arp.c
+++ b/usr.sbin/arp/arp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arp.c,v 1.9 1997/11/21 22:42:55 deraadt Exp $ */
+/* $OpenBSD: arp.c,v 1.10 1997/11/28 05:34:41 art Exp $ */
/* $NetBSD: arp.c,v 1.12 1995/04/24 13:25:18 cgd Exp $ */
/*
@@ -215,6 +215,8 @@ set(argc, argv)
if (getinetaddr(host, &sin->sin_addr) == -1)
return (1);
ea = ether_aton(eaddr);
+ if (ea == NULL)
+ errx(1, "invalid ethernet address: %s\n", eaddr);
memcpy(LLADDR(&sdl_m), ea, sizeof (*ea));
sdl_m.sdl_alen = 6;
doing_proxy = flags = export_only = expire_time = 0;