summaryrefslogtreecommitdiff
path: root/usr.sbin/snmpd
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2018-10-10 11:47:00 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2018-10-10 11:47:00 +0000
commit6680be4f191226402a6424962e47cf802fe7826d (patch)
tree4f1f5665613ea3d37deed20b430dcd69cf4bb1f7 /usr.sbin/snmpd
parent6a3005e690de49bee6e3e3f6f15abfaa9c49e553 (diff)
RT_TABLEID_MAX is 255, fix places that assumed that it is less than 255.
rtable 255 is a valid routing table or domain id that wasn't handled by the ip[6]_mroute code or by snmpd. The arrays in the ip[6]_mroute code where off by one and didn't allocate space for rtable 255; snmpd simply ignored rtable 255. All other places in the tree seem to handle RT_TABLEID_MAX correctly. OK florian@ benno@ henning@ deraadt@
Diffstat (limited to 'usr.sbin/snmpd')
-rw-r--r--usr.sbin/snmpd/kroute.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/snmpd/kroute.c b/usr.sbin/snmpd/kroute.c
index e24c3f7e9a9..3604f884dea 100644
--- a/usr.sbin/snmpd/kroute.c
+++ b/usr.sbin/snmpd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.35 2017/07/24 11:00:01 friehm Exp $ */
+/* $OpenBSD: kroute.c,v 1.36 2018/10/10 11:46:59 reyk Exp $ */
/*
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org>
@@ -211,7 +211,7 @@ ktable_init(void)
{
u_int i;
- for (i = 0; i < RT_TABLEID_MAX; i++)
+ for (i = 0; i <= RT_TABLEID_MAX; i++)
if (ktable_exists(i, NULL))
ktable_update(i);
}