summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/policy.c
diff options
context:
space:
mode:
authorHakan Olsson <ho@cvs.openbsd.org>2004-06-20 15:24:06 +0000
committerHakan Olsson <ho@cvs.openbsd.org>2004-06-20 15:24:06 +0000
commit296e43726af7240ad61013d007264b8effec9333 (patch)
treeb4f391ee607488f132ec2354d64361bf9b4e3735 /sbin/isakmpd/policy.c
parentdce4168d7b1745fda1db84e6b445d6e2141503cf (diff)
NAT-Traversal for isakmpd. Work in progress...
hshoexer@ ok.
Diffstat (limited to 'sbin/isakmpd/policy.c')
-rw-r--r--sbin/isakmpd/policy.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/sbin/isakmpd/policy.c b/sbin/isakmpd/policy.c
index 5dc1752997d..c9ff0eab6d5 100644
--- a/sbin/isakmpd/policy.c
+++ b/sbin/isakmpd/policy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: policy.c,v 1.74 2004/06/14 09:55:42 ho Exp $ */
+/* $OpenBSD: policy.c,v 1.75 2004/06/20 15:24:05 ho Exp $ */
/* $EOM: policy.c,v 1.49 2000/10/24 13:33:39 niklas Exp $ */
/*
@@ -509,6 +509,23 @@ policy_callback(char *name)
comp_encapsulation = "tunnel";
break;
}
+#if defined (USE_NAT_TRAVERSAL)
+ else if (decode_16(value) == IPSEC_ENCAP_UDP_ENCAP_TUNNEL)
+ switch (proto->proto) {
+ case IPSEC_PROTO_IPSEC_AH:
+ ah_encapsulation = "udp-encap-tunnel";
+ break;
+
+ case IPSEC_PROTO_IPSEC_ESP:
+ esp_encapsulation = "udp-encap-tunnel";
+ break;
+
+ case IPSEC_PROTO_IPCOMP:
+ comp_encapsulation = "udp-encap-tunnel";
+ break;
+ }
+ /* XXX IPSEC_ENCAP_UDP_ENCAP_TRANSPORT */
+#endif
else
switch (proto->proto) {
case IPSEC_PROTO_IPSEC_AH: