From d61d1913e1600a955c7a5c2ca87392c1868e1c56 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Thu, 17 Jul 2008 08:25:34 +0000 Subject: ignore IPCOMP acquires, fixes additional CHILD_SA setup with acquired SAs using compression --- src/charon/kernel/kernel_interface.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/charon/kernel/kernel_interface.c') diff --git a/src/charon/kernel/kernel_interface.c b/src/charon/kernel/kernel_interface.c index c5fba5238..c403fb86b 100644 --- a/src/charon/kernel/kernel_interface.c +++ b/src/charon/kernel/kernel_interface.c @@ -547,6 +547,7 @@ static void add_attribute(struct nlmsghdr *hdr, int rta_type, chunk_t data, static void process_acquire(private_kernel_interface_t *this, struct nlmsghdr *hdr) { u_int32_t reqid = 0; + int proto = 0; job_t *job; struct rtattr *rtattr = XFRM_RTA(hdr, struct xfrm_user_acquire); size_t rtsize = XFRM_PAYLOAD(hdr, struct xfrm_user_tmpl); @@ -557,8 +558,19 @@ static void process_acquire(private_kernel_interface_t *this, struct nlmsghdr *h { struct xfrm_user_tmpl* tmpl = (struct xfrm_user_tmpl*)RTA_DATA(rtattr); reqid = tmpl->reqid; + proto = tmpl->id.proto; } } + switch (proto) + { + case 0: + case IPPROTO_ESP: + case IPPROTO_AH: + break; + default: + /* acquire for AH/ESP only, not for IPCOMP */ + return; + } if (reqid == 0) { DBG1(DBG_KNL, "received a XFRM_MSG_ACQUIRE, but no reqid found"); -- cgit v1.2.3