diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-11-11 17:23:17 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-11-11 17:23:17 +0000 |
commit | a114935438d27f7a14bd06caa4cc843fb09d8eea (patch) | |
tree | 446846f1dfb5efb1f3e93d0470254800d8fcfffe | |
parent | 93694c88c8ba08f05ccc6cb4f55cefd485636c96 (diff) |
correctly order the range check and use the right limits, pointed out by parfait
ok claudio millert
-rw-r--r-- | usr.sbin/rtsold/probe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/rtsold/probe.c b/usr.sbin/rtsold/probe.c index 172c6fe7d5c..ab16836bb46 100644 --- a/usr.sbin/rtsold/probe.c +++ b/usr.sbin/rtsold/probe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: probe.c,v 1.12 2008/03/24 16:11:05 deraadt Exp $ */ +/* $OpenBSD: probe.c,v 1.13 2009/11/11 17:23:16 deraadt Exp $ */ /* $KAME: probe.c,v 1.16 2002/06/10 20:00:36 itojun Exp $ */ /* @@ -116,7 +116,7 @@ defrouter_probe(struct ifinfo *ifinfo) goto closeandend; } - for (i = 0; dr.defrouter[i].if_index && i < PRLSTSIZ; i++) { + for (i = 0; i < DRLSTSIZ && dr.defrouter[i].if_index; i++) { if (ifindex && dr.defrouter[i].if_index == ifindex) { /* sanity check */ if (!IN6_IS_ADDR_LINKLOCAL(&dr.defrouter[i].rtaddr)) { |