Date: Tue, 12 Jan 2010 10:41:55 GMT From: Matthijs Kooiman <matthijs@stdin.nl> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/142741: Wrong use of constant PF_UNSPEC in libipsec/pfkey.c, should be SADB_SATYPE_UNSPEC Message-ID: <201001121041.o0CAftxb026606@www.freebsd.org> Resent-Message-ID: <201001121050.o0CAo0iJ009256@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001121041.o0CAftxb026606>
