OSDN Git Service

xfrm: Fix policy hold queue after flowcache removal.
authorSteffen Klassert <steffen.klassert@secunet.com>
Thu, 1 Feb 2018 10:26:12 +0000 (11:26 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Tue, 13 Feb 2018 08:09:28 +0000 (09:09 +0100)
Now that the flowcache is removed we need to generate
a new dummy bundle every time we check if the needed
SAs are in place because the dummy bundle is not cached
anymore. Fix it by passing the XFRM_LOOKUP_QUEUE flag
to xfrm_lookup(). This makes sure that we get a dummy
bundle in case the SAs are not yet in place.

Fixes: 3ca28286ea80 ("xfrm_policy: bypass flow_cache_lookup")
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_policy.c

index 7a23078..8b3811f 100644 (file)
@@ -1891,7 +1891,7 @@ static void xfrm_policy_queue_process(struct timer_list *t)
        spin_unlock(&pq->hold_queue.lock);
 
        dst_hold(xfrm_dst_path(dst));
-       dst = xfrm_lookup(net, xfrm_dst_path(dst), &fl, sk, 0);
+       dst = xfrm_lookup(net, xfrm_dst_path(dst), &fl, sk, XFRM_LOOKUP_QUEUE);
        if (IS_ERR(dst))
                goto purge_queue;