|
|||||||||||
|
user/2996: PF_KEY_ACQUIRE messages are misunderstood by ISAKMPD
From: Mike Neuman <mcn(at)EnGarde.com>
Date: Wed Nov 27 2002 - 23:50:19 EST
System : OpenBSD 3.2
Architecture: OpenBSD.i386
Machine : i386
>Description: There is an inconsistency in the semantics for ipsec flows and the way ISAKMP parses them. A flow specified as: ipsecadm flow -require -addr 0.0.0.0 0.0.0.0 10.0.0.1 255.255.255.255 -out is fully specified. In particular, the flow says to require ipsec from anywhere (typically us with a dynamic IP address, but anyone else who uses us as a gateway) to 10.0.0.1. There is no "gateway" specified by a "-dst" flag, because we are using IPSec transport instead of tunneling.
The flow is added and processed by the kernel just fine. However, when
ISAKMPD
Line 3077 (and subsequent lines) of ISAKMPD pf_key_v2.c assumes dstaddr
will be an AF_INET or AF_INET6 sockaddr, which is not necessarily true (it
may
Line 3102 shows the author understands that EXT_ADDRESS_SRC may not be specified. However, the if statement is invalid--the kernel ALWAYS sends an all-'0' struct sockaddr, so 'if (src)' will never evaluate false--instead the case statement falls through a non-existent 'default' breaking the "Peer-" name again.
In short, the kernel sends acquire messages which are not properly parsed
by ISAKMPD. There is a bias towards assuming there is a "destination" and
that
Add an ipsec transport flow:
Notice the peername is "Peer-/" which is really wrong. :-)
This patch will allow you specify flows without explicit -src or -dst. You can even specify non-specific flows (such as: ipsecadm flow -require -addr 0.0.0.0 0.0.0.0 10.0.0.1 255.255.255.0 -out which would definitely NOT work without this patch).
Index: pf_key_v2.c
>Release-Note:
This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:29:38 EDT |
||||||||||
|
|||||||||||