From a6c917daee50fb5ed081169a1019666a8bfcd23a Mon Sep 17 00:00:00 2001 From: Joel Knight Date: Tue, 9 Oct 2007 21:41:55 +0000 Subject: Fix range check for carp vhid: vhid 0 isn't valid --- sbin/ifconfig/ifconfig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 6e7c2df97e4..020ced97f95 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifconfig.c,v 1.187 2007/09/02 15:19:23 deraadt Exp $ */ +/* $OpenBSD: ifconfig.c,v 1.188 2007/10/09 21:41:54 joel Exp $ */ /* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */ /* @@ -2936,7 +2936,7 @@ setcarp_vhid(const char *val, int d) struct carpreq carpr; int vhid; - vhid = strtonum(val, 0, 255, &errmsg); + vhid = strtonum(val, 1, 255, &errmsg); if (errmsg) errx(1, "vhid %s: %s", val, errmsg); -- cgit v1.2.3