From nobody Sun Mar 1 10:06:53 2026 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fNyQj1nxQz6TR00 for ; Sun, 01 Mar 2026 10:06:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fNyQj156wz3jWW for ; Sun, 01 Mar 2026 10:06:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772359613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F2aBDk0TKuho2bukNC/lNKnvt5gHOV4c+hkVaIU2svg=; b=XwqBuxLjFlSuDRipVTwQc96GUhrTjCb7lPfwNU9VGhriAf313FoOhttJfbIhdeffBwd5Ul c+DUunNxKgRNid3siCEaWeUgBITVChNXxsNQlqX7L9VTirnTuKCapP48/OFuE+s0NmRY45 tUEmzh+YC+k4k+vX6UfM/hmu6xsCFOrxMRk0z3BhJiHqrgvV6uxdm9zD9bNOjYf01X7kCT 1nsabX+vkzbu/Dcd75/fqe9iHjyiTuSJ+KvHzsoOKqn0ih9WSlx8va5lFwT0IR5p20Pdyu 3PWu7z35ZwLVr5ctJok4kjNeI1YUBbSydajSAJqWWUyMQ942SfMHhjEP86aXgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772359613; a=rsa-sha256; cv=none; b=F0nS89LOVLlcY7DP+mo1C1zQPJeAtpB8WwZLR/USJYb4pycOOyfgt6DML7rakgzI1kEFeN L/oKzoPhfp2qHRxcKYfmRjg16KAGwea8g8yK6Qb+NKmmckR5VZsQRVyqi2+8Nvotb2haJG bnRLi8ikkGZWPlZpl1frjEb6EwVnge4wSJbyPMxg/1Djze39pfVvE8RPO2tTXXQfY+itWR dc9B45LiYYX+CVvyjI8K0uSFPjXMTdApszLrHM6mhIZJJNmLcMY9J11RlYzbi7oiZ0S9ij HMhopvz38l36vYku2ju4qwasi0OY09ID2K/UWMdxLy/ihF+b6Xc6S7XtAnw2VQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772359613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F2aBDk0TKuho2bukNC/lNKnvt5gHOV4c+hkVaIU2svg=; b=NkvMbpE3JbPlhTRdjMw5jwPXTfqsMT5XY9AG0YrdZfmr2yuCfP5nobxpMft88xS/VD7T/D +vX/3i6GDBa2q06JESmEQtbWkGEBPkYncSmw8Mlg8gqvfUtbOAZJ8PaiR75sgBE77MB63Z TPZ+GLkt9Twp7zmQ9yx/RZHLG9h6Velhx+p1Gz5Oz56uactzgrmOZtF1TTqMV6KeR9/AJj RQ7c4wtZchtotExOBK4zAR87TD47OX9dcMRdoCJ1dyyFv+TKb1yH0DuPFPkkCjwsyheQwB aqsOQi9BE13PO9Inz/7SyrH6hjW+GDQvar02l0bFsYal3Pf+bN6fzw+Zfq4fTw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4fNyQh75Vrzkxd for ; Sun, 01 Mar 2026 10:06:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 621A6q0P079460 for ; Sun, 1 Mar 2026 10:06:52 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 621A6qCH079458 for bugs@FreeBSD.org; Sun, 1 Mar 2026 10:06:52 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 293522] bsnmpd: does not create or update engine_file when engine [ID] is auto-set (defaults) Date: Sun, 01 Mar 2026 10:06:53 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: bms@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D293522 Bug ID: 293522 Summary: bsnmpd: does not create or update engine_file when engine [ID] is auto-set (defaults) Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: bms@FreeBSD.org TL;DR In bsnmpd, snmpEngineID is normally set from kern.hostid, but if allo= wed to do so, it appears both the snmpEngineBoots counter and the snmpEngineID = OID will NOT be persisted to disk, as they should be. This is effectively how a "boot counter" is presented as a management objec= t, and follows on from GSoC work to be proposed. SNMP v3 USM, i.e. RFC 3414, defines OID 1.3.6.1.6.3.10.2.1.2, aka snmpEngineBoots: https://datatracker.ietf.org/doc/html/rfc3414#section-2.2 Net-SNMP implements this by writing to $SNMP_PERSISTENT_FILE which normally points to /var/net-snmp/snmpd.conf as an integer value to the configuration variable "engineBoots". bsnmpd allegedly does the same thing, in contrib/bsnmp/snmpd/action.c, where snmpd_engine.engine_boots is also persisted to a disk file, in this case, named by engine_file defined in contrib/bsnmp/snmpd/main.c, which defaults to PATH_ENGINE: "/var/snmpd.engine". However, I could not get this to function on a first run. In /etc/rc.conf, bnmpd_flags had to be set to a non-default value: "-e /var/snmpd.engine". Moreover, two lines had to be uncommented in /etc/snmpd.config; the default engine file location also had to be "touched". The snmpEngineBoots counter is however being exposed via SNMP and this can = be verified from outside the bsnmpd process, however, not on an unqualified snmpwalk: snmpget -v2c -c public localhost .iso.org.dod.internet.snmpV2.snmpModules.snmpFrameworkMIB.snmpFrameworkMIBO= bjects.snmpEngine.snmpEngineBoots.0 For some obscure reason, you have to specify an OID subtree to snmpwalk, or= it doesn't see it. A search on Bugzilla for bsnmpd issues shows many historical closed bug reports, and few open ones (I opened one for the lack of AgentX support). However, this isn't one of them, unless you count: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D174974 And the relevant change seems to be commit-id 3b49535 in git, for contrib/bsnmp/lib/snmpagent.c, originally from SVN: https://svnweb.freebsd.org/base?view=3Drevision&revision=3D308490 Whilst this may explain why snmpEngineBoots wasn't readily visible on an unqualified snmpwalk, it does not explain why bsnmpd has problems persisting its setting when its engine ID is not set statically in config. There are surely other issues lurking deeper in bsnmpd. OT: glebius@ seems to have been historically critical of (the lack of) bsnm= pd maintenance: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D93758#c2 --=20 You are receiving this mail because: You are the assignee for the bug.=