From ba4974384ff9eacf626f6c7defce1d3f7848e5fd Mon Sep 17 00:00:00 2001 From: martijn Date: Tue, 30 Aug 2022 17:33:20 +0000 Subject: [PATCH] Remove the downwards check for overlapping regions when the subtree flag is set. There's a bit of inverted logic in there and this feature will probably get in the way of the blocklist feature (and maybe others) OK tb@ --- usr.sbin/snmpd/application.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/usr.sbin/snmpd/application.c b/usr.sbin/snmpd/application.c index dad8ce44417..a4a7da404f4 100644 --- a/usr.sbin/snmpd/application.c +++ b/usr.sbin/snmpd/application.c @@ -1,4 +1,4 @@ -/* $OpenBSD: application.c,v 1.12 2022/08/29 18:05:08 martijn Exp $ */ +/* $OpenBSD: application.c,v 1.13 2022/08/30 17:33:20 martijn Exp $ */ /* * Copyright (c) 2021 Martijn van Duren @@ -237,14 +237,6 @@ appl_region(struct appl_context *ctx, uint32_t timeout, uint8_t priority, region->ar_backend != backend) goto overlap; - search.ar_oid = *oid; - region = RB_NFIND(appl_regions, &(ctx->ac_regions), &search); - if (region != NULL && region->ar_subtree && - region->ar_backend != backend && ( - appl_region_cmp(&search, region) == 0 || - appl_region_cmp(&search, region) == -2)) - goto overlap; - if ((nregion = malloc(sizeof(*nregion))) == NULL) { log_warn("%s: Can't register %s: Processing error", backend->ab_name, oidbuf); -- 2.20.1