Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Aug 2005 20:23:49 +0200
From:      VANHULLEBUS Yvan <yvan.vanhullebus@netasq.com>
To:        freebsd-net@freebsd.org
Cc:        manu@netbsd.org, snap-users@kame.net
Subject:   Some missing splnet() in key.c
Message-ID:  <20050817182349.GB2349@yvan.netasq.int>

next in thread | raw e-mail | index | archive | help

--Sr1nOIr3CvdE5hEN
Content-Type: multipart/mixed; boundary="aM3YZ0Iwxop3KEKx"
Content-Disposition: inline


--aM3YZ0Iwxop3KEKx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi all.

A few months ago, I reported some missing splnet() in key.c to
snap-users@kame.net. I found them by tracking some random and strange
problems, which are more likely to happen when running on a "slow"
CPU, when having some heavy PFKey activity and when having high IPSec
traffic.

The attached patch (made against FreeBSD6 version, but should be easy
to port to other versions) fixes at least most splnet problems (well,
at least, I didn't have any more report for customers which use the
latest version including all those locks....).

Please note that mixing this patch and the FreeBSD NAT-T patch
available on ipsec-tools web site will have a possible dead lock in
key_add(), when handling NAT-T extensions (Manu: check that for
NetBSD, there is probably the same code !).

I'll update quickly FreeBSD6 NAT-T patchset on ipsec-tools web site if
this patch is commited on FreeBSD6 source.


Yvan.

--=20
NETASQ - Secure Internet Connectivity
http://www.netasq.com

--aM3YZ0Iwxop3KEKx--

--Sr1nOIr3CvdE5hEN
Content-Type: application/x-pkcs7-signature
Content-Disposition: attachment; filename="smime.p7s"
Content-Transfer-Encoding: base64

MIINPQYJKoZIhvcNAQcCoIINLjCCDSoCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHAaCC
CokwggZ/MIIFZ6ADAgECAgpwxrFIFmvykFosMA0GCSqGSIb3DQEBBAUAMIGRMQswCQYDVQQG
EwJGUjENMAsGA1UECBMETm9yZDEaMBgGA1UEBxMRVmlsbGVuZXV2ZSBkJ0FzY3ExLjAsBgNV
BAoTJU5FVEFTUSAtIFNlY3VyZSBJbn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