diff options
author | tobhe <tobhe@cvs.openbsd.org> | 2020-08-13 21:36:39 +0000 |
---|---|---|
committer | tobhe <tobhe@cvs.openbsd.org> | 2020-08-13 21:36:39 +0000 |
commit | 41bfefafaa6474a8d1aa2961049bfdf42e0ab299 (patch) | |
tree | 5392f73b35629bb4ff878b4ec838b1af1405f7a9 /sbin | |
parent | 04a2290856890c4bd0282538933108f5a1c0f47b (diff) |
Properly set flow_saproto for aquire.
ok patrick@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/iked/pfkey.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sbin/iked/pfkey.c b/sbin/iked/pfkey.c index 202e3a374d0..9ac87ebf738 100644 --- a/sbin/iked/pfkey.c +++ b/sbin/iked/pfkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkey.c,v 1.68 2020/07/21 08:03:39 tobhe Exp $ */ +/* $OpenBSD: pfkey.c,v 1.69 2020/08/13 21:36:38 tobhe Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org> @@ -1895,6 +1895,18 @@ pfkey_process(struct iked *env, struct pfkey_message *pm) return (0); } + switch (hdr->sadb_msg_satype) { + case SADB_SATYPE_AH: + flow.flow_saproto = IKEV2_SAPROTO_AH; + break; + case SADB_SATYPE_ESP: + flow.flow_saproto = IKEV2_SAPROTO_ESP; + break; + case SADB_X_SATYPE_IPCOMP: + flow.flow_saproto = IKEV2_SAPROTO_IPCOMP; + break; + } + if ((sa_proto = pfkey_find_ext(reply, rlen, SADB_X_EXT_FLOW_TYPE)) == NULL) { errmsg = "flow protocol"; |