From owner-freebsd-ports-bugs@freebsd.org Sat Apr 14 21:38:18 2018 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70DBFF9C248 for ; Sat, 14 Apr 2018 21:38:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id E9EF37BA74 for ; Sat, 14 Apr 2018 21:38:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id AE660F9C246; Sat, 14 Apr 2018 21:38:17 +0000 (UTC) Delivered-To: ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 740E0F9C241 for ; Sat, 14 Apr 2018 21:38:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EC0867BA4D for ; Sat, 14 Apr 2018 21:38:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 0B5F6265AB for ; Sat, 14 Apr 2018 21:38:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w3ELcFFs091625 for ; Sat, 14 Apr 2018 21:38:15 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w3ELcFBr091624 for ports-bugs@FreeBSD.org; Sat, 14 Apr 2018 21:38:15 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: ports-bugs@FreeBSD.org Subject: [Bug 227502] Unable to add pfsense as monitored target in ntopng Date: Sat, 14 Apr 2018 21:38:15 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: eugen@freebsd.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: harti@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Apr 2018 21:38:18 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D227502 Eugene Grosbein changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Open Assignee|ports-bugs@FreeBSD.org |harti@FreeBSD.org CC| |eugen@freebsd.org, | |net@FreeBSD.org --- Comment #1 from Eugene Grosbein --- I've reproduced the problem building and running third-party/snmp/test.c fr= om net/ntopng source tree. I run bsnmpd in debug mode: /usr/sbin/bsnmpd -p /var/run/snmpd.pid -d -D dump,trace=3D0x30000000 Incoming SNMPv1 GetRequest as captured and decoded by tcpdump: 04:15:32.993260 IP (tos 0x0, ttl 62, id 21558, offset 0, flags [none], proto UDP (17), length 81) X.X.X.X.46351 > X.X.X.X.Y: [udp sum ok] { SNMPv1 C=3D"xxxxxxx" { GetRequest(34) R=3D1 .1.3.6.1.2.1.1.5.0 } } bsnmpd fails to parse it producing errors: snmpd[45132]: ASN.1: non-minimal integer at 00 00 00 00 04 07 72 65 77 6f 7= 2 74 68 a0 22 02 04 00 00 00 01 02 04 00 00 00 00 02 04 00 00 00 00 30 0e 30 0c = 06 08 2b 06 01 02 01 01 05 00 05 00 snmpd[45132]: SNMP: cannot decode version ntopng uses bundled copy of library https://github.com/ejrh/snmp to encode = SNMP data into packets and this library seems to produce incorrect DER/ASN.1 pac= kets always encoding integers with 4 bytes per value. The library itself is pret= ty old, it was not updated for 6 years. snmpwalk, on the other hand, produces correct requests and bsnmpd answers j= ust fine. It seems, net-snmpd tolerates such standard violation but bsnmpd does not. Please note that other modern software tend to stick to strict validation t= oo.=20 For example, golang's library encoding/asn1 rejects such invalid "non-minim= al integer encodings" since version 1.7: https://golang.org/doc/go1.7 --=20 You are receiving this mail because: You are the assignee for the bug.=