From: martijn Date: Tue, 21 Nov 2023 08:47:04 +0000 (+0000) Subject: Make RTFILTER/filter-routes a simple boolean assignment, since the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ab8dd476f7f430b03230056894cf0a1d47324ab9;p=openbsd Make RTFILTER/filter-routes a simple boolean assignment, since the specific value isn't used anymore, and is just used to generate an argument for snmpd_metrics. OK tb@ --- diff --git a/usr.sbin/snmpd/parse.y b/usr.sbin/snmpd/parse.y index da51d238bc4..8492775573c 100644 --- a/usr.sbin/snmpd/parse.y +++ b/usr.sbin/snmpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.82 2023/11/12 20:04:35 martijn Exp $ */ +/* $OpenBSD: parse.y,v 1.83 2023/11/21 08:47:04 martijn Exp $ */ /* * Copyright (c) 2007, 2008, 2012 Reyk Floeter @@ -331,13 +331,7 @@ main : LISTEN ON listen_udptcp free($2); } | RTFILTER yesno { - if ($2 == 1) - conf->sc_rtfilter = ROUTE_FILTER(RTM_NEWADDR) | - ROUTE_FILTER(RTM_DELADDR) | - ROUTE_FILTER(RTM_IFINFO) | - ROUTE_FILTER(RTM_IFANNOUNCE); - else - conf->sc_rtfilter = 0; + conf->sc_rtfilter = $2; } | seclevel { conf->sc_min_seclevel = $1;