diff options
author | glebius <glebius@FreeBSD.org> | 2006-02-09 12:49:39 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2006-02-09 12:49:39 +0000 |
commit | 642125c1986a9ec4696a5164c810502588a9cec8 (patch) | |
tree | a2ac60099029d8b96dfcdc9d08849c51a27d4f80 /usr.sbin | |
parent | 0e3468c387172657a2723a03a896db68a3b9f068 (diff) | |
download | FreeBSD-src-642125c1986a9ec4696a5164c810502588a9cec8.zip FreeBSD-src-642125c1986a9ec4696a5164c810502588a9cec8.tar.gz |
Refuse to install invalid ARP entries.
Submitted by: Vitaliy Ovsyannikov <V.Ovsyannikov kr.ru>
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/arp/arp.c | 5 |
1 files 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; } |