From owner-freebsd-bugs@FreeBSD.ORG Tue Jan 12 10:50:01 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1336106566C for ; Tue, 12 Jan 2010 10:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E3E008FC0A for ; Tue, 12 Jan 2010 10:50:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CAo0L6009257 for ; Tue, 12 Jan 2010 10:50:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o0CAo0iJ009256; Tue, 12 Jan 2010 10:50:00 GMT (envelope-from gnats) Resent-Date: Tue, 12 Jan 2010 10:50:00 GMT Resent-Message-Id: <201001121050.o0CAo0iJ009256@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Matthijs Kooiman Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2A35106566B for ; Tue, 12 Jan 2010 10:41:56 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id B16948FC15 for ; Tue, 12 Jan 2010 10:41:56 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o0CAftc5026607 for ; Tue, 12 Jan 2010 10:41:55 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o0CAftxb026606; Tue, 12 Jan 2010 10:41:55 GMT (envelope-from nobody) Message-Id: <201001121041.o0CAftxb026606@www.freebsd.org> Date: Tue, 12 Jan 2010 10:41:55 GMT From: Matthijs Kooiman To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/142741: Wrong use of constant PF_UNSPEC in libipsec/pfkey.c, should be SADB_SATYPE_UNSPEC X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 10:50:01 -0000 >Number: 142741 >Category: misc >Synopsis: Wrong use of constant PF_UNSPEC in libipsec/pfkey.c, should be SADB_SATYPE_UNSPEC >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jan 12 10:50:00 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Matthijs Kooiman >Release: HEAD >Organization: I.C.T.S.V. Inter-Actief >Environment: >Description: While debugging a problem with IPSEC on my 6.4 box, I noticed that libipsec uses the wrong constant, as per subject. This occurs in lib/libipsec/pfkey.c:665 in pfkey_send_register in both my 6.4 version as in the HEAD version (http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libipsec/pfkey.c?annotate=1.9.10.1.2.1): if (satype == PF_UNSPEC) { Line 1389 and this snippet from sbin/setkey/setkey.c show that it should indeed be SADB_SATYPE_UNSPEC if (pfkey_send_register(so, SADB_SATYPE_UNSPEC) < 0) return -1; Since these constants both have the value 0, this wrong constant has never caused any problems, but for clarity and to prevent possible future bugs, it's probably best to change it? >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: