From 6680be4f191226402a6424962e47cf802fe7826d Mon Sep 17 00:00:00 2001 From: Reyk Floeter Date: Wed, 10 Oct 2018 11:47:00 +0000 Subject: 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@ --- usr.sbin/snmpd/kroute.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin/snmpd') 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 @@ -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); } -- cgit v1.2.3