From be2edbd69927403d677656b6f37866434d1bdf0b Mon Sep 17 00:00:00 2001 From: martijn Date: Tue, 24 Oct 2023 08:41:20 +0000 Subject: [PATCH] Remove filter-pf-addresses. This feature has been deprecated since 7.2 in favour of 'blocklist pfTblAddrTable'. OK tb@ --- usr.sbin/snmpd/parse.y | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/usr.sbin/snmpd/parse.y b/usr.sbin/snmpd/parse.y index 2f04e8803db..8f9bad07a8c 100644 --- a/usr.sbin/snmpd/parse.y +++ b/usr.sbin/snmpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.78 2022/10/06 14:41:08 martijn Exp $ */ +/* $OpenBSD: parse.y,v 1.79 2023/10/24 08:41:20 martijn Exp $ */ /* * Copyright (c) 2007, 2008, 2012 Reyk Floeter @@ -140,7 +140,7 @@ typedef struct { %token SYSTEM CONTACT DESCR LOCATION NAME OBJECTID SERVICES RTFILTER %token READONLY READWRITE OCTETSTRING INTEGER COMMUNITY TRAP RECEIVER %token SECLEVEL NONE AUTH ENC USER AUTHKEY ENCKEY ERROR -%token HANDLE DEFAULT SRCADDR TCP UDP PFADDRFILTER BLOCKLIST PORT +%token HANDLE DEFAULT SRCADDR TCP UDP BLOCKLIST PORT %token STRING %token NUMBER %type usmuser community optcommunity @@ -336,26 +336,6 @@ main : LISTEN ON listen_udptcp else conf->sc_rtfilter = 0; } - /* XXX Remove after 7.4 */ - | PFADDRFILTER yesno { - struct ber_oid *blocklist; - - log_warnx("filter-pf-addresses is deprecated. " - "Please use blocklist pfTblAddrTable instead."); - if ($2) { - blocklist = recallocarray(conf->sc_blocklist, - conf->sc_nblocklist, - conf->sc_nblocklist + 1, - sizeof(*blocklist)); - if (blocklist == NULL) { - yyerror("malloc"); - YYERROR; - } - conf->sc_blocklist = blocklist; - smi_string2oid("pfTblAddrTable", - &(blocklist[conf->sc_nblocklist++])); - } - } | seclevel { conf->sc_min_seclevel = $1; } @@ -1195,7 +1175,6 @@ lookup(char *s) { "enc", ENC }, { "enckey", ENCKEY }, { "engineid", ENGINEID }, - { "filter-pf-addresses", PFADDRFILTER }, { "filter-routes", RTFILTER }, { "group", GROUP }, { "handle", HANDLE }, -- 2.20.1