summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorMartijn van Duren <martijn@cvs.openbsd.org>2023-11-21 08:49:09 +0000
committerMartijn van Duren <martijn@cvs.openbsd.org>2023-11-21 08:49:09 +0000
commit1115fc02c208a6b1159735d1f9be820d36e4c801 (patch)
tree18006844b5ed0dc57b8e0ddff9993a1c6cb93aa0 /libexec
parentfae627dca6bab70cfcbb36889eeaff701da590e2 (diff)
Set sc_rtfilter to specific ROUTE_FILTER() values, as was originally
intended, instead of filtering out everything. OK sthen@
Diffstat (limited to 'libexec')
-rw-r--r--libexec/snmpd/snmpd_metrics/mib.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libexec/snmpd/snmpd_metrics/mib.c b/libexec/snmpd/snmpd_metrics/mib.c
index 8a0f5eb061c..a3b80ddf9ac 100644
--- a/libexec/snmpd/snmpd_metrics/mib.c
+++ b/libexec/snmpd/snmpd_metrics/mib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mib.c,v 1.6 2023/10/24 18:27:26 martijn Exp $ */
+/* $OpenBSD: mib.c,v 1.7 2023/11/21 08:49:08 martijn Exp $ */
/*
* Copyright (c) 2022 Martijn van Duren <martijn@openbsd.org>
@@ -3270,7 +3270,11 @@ main(int argc, char *argv[])
switch (ch) {
case 'C':
if (strcmp(optarg, "filter-routes") == 0) {
- conf.sc_rtfilter = 1;
+ conf.sc_rtfilter = ROUTE_FILTER(RTM_NEWADDR) |
+ ROUTE_FILTER(RTM_DELADDR) |
+ ROUTE_FILTER(RTM_IFINFO) |
+ ROUTE_FILTER(RTM_IFANNOUNCE);
+
}
break;
case 'c':