From 642125c1986a9ec4696a5164c810502588a9cec8 Mon Sep 17 00:00:00 2001 From: glebius Date: Thu, 9 Feb 2006 12:49:39 +0000 Subject: Refuse to install invalid ARP entries. Submitted by: Vitaliy Ovsyannikov --- usr.sbin/arp/arp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index d7cdc20..aee3da4 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -348,9 +348,10 @@ set(int argc, char **argv) } else { struct ether_addr *ea1 = ether_aton(eaddr); - if (ea1 == NULL) + if (ea1 == NULL) { warnx("invalid Ethernet address '%s'", eaddr); - else { + return (1); + } else { *ea = *ea1; sdl_m.sdl_alen = ETHER_ADDR_LEN; } -- cgit v1.1