From 7515106c2ab94c288524f235eb991a046feea943 Mon Sep 17 00:00:00 2001 From: martijn Date: Mon, 29 Aug 2022 18:05:08 +0000 Subject: [PATCH] Allow overlapping regions (if subtree claim flag is set) when the backends are identical. OK tb@ --- usr.sbin/snmpd/application.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/usr.sbin/snmpd/application.c b/usr.sbin/snmpd/application.c index 820d5aaa02f..dad8ce44417 100644 --- a/usr.sbin/snmpd/application.c +++ b/usr.sbin/snmpd/application.c @@ -1,4 +1,4 @@ -/* $OpenBSD: application.c,v 1.11 2022/08/29 18:02:37 martijn Exp $ */ +/* $OpenBSD: application.c,v 1.12 2022/08/29 18:05:08 martijn Exp $ */ /* * Copyright (c) 2021 Martijn van Duren @@ -233,12 +233,14 @@ appl_region(struct appl_context *ctx, uint32_t timeout, uint8_t priority, * This allows us to keep control of certain regions like system. */ region = appl_region_find(ctx, oid); - if (region != NULL && region->ar_subtree) + if (region != NULL && region->ar_subtree && + 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 && ( + if (region != NULL && region->ar_subtree && + region->ar_backend != backend && ( appl_region_cmp(&search, region) == 0 || appl_region_cmp(&search, region) == -2)) goto overlap; -- 2.20.1