kernel-netlink: Read protocol of acquire not from template
If a policy with IPComp template triggers an acquire, we get two, one for an IPComp, one for ESP/AH SA. However, the triggering template of the trap policy (where we get the reqid from), will be the same in both acquires, IPComp, which we ignore, so no acquire was actually forwarded.
This commit is contained in:
@@ -899,9 +899,10 @@ static void process_acquire(private_kernel_netlink_ipsec_t *this,
|
||||
size_t rtasize;
|
||||
traffic_selector_t *src_ts, *dst_ts;
|
||||
uint32_t reqid = 0;
|
||||
int proto = 0;
|
||||
uint8_t proto;
|
||||
|
||||
acquire = NLMSG_DATA(hdr);
|
||||
proto = acquire->id.proto;
|
||||
rta = XFRM_RTA(hdr, struct xfrm_user_acquire);
|
||||
rtasize = XFRM_PAYLOAD(hdr, struct xfrm_user_acquire);
|
||||
|
||||
@@ -916,7 +917,6 @@ static void process_acquire(private_kernel_netlink_ipsec_t *this,
|
||||
struct xfrm_user_tmpl* tmpl;
|
||||
tmpl = (struct xfrm_user_tmpl*)RTA_DATA(rta);
|
||||
reqid = tmpl->reqid;
|
||||
proto = tmpl->id.proto;
|
||||
}
|
||||
rta = RTA_NEXT(rta, rtasize);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user