Skip to content
Commit ac37e251 authored by huaibin Wang's avatar huaibin Wang Committed by Steffen Klassert
Browse files

xfrm: release dst_orig in case of error in xfrm_lookup()



dst_orig should be released on error. Function like __xfrm_route_forward()
expects that behavior.
Since a recent commit, xfrm_lookup() may also be called by xfrm_lookup_route(),
which expects the opposite.
Let's introduce a new flag (XFRM_LOOKUP_KEEP_DST_REF) to tell what should be
done in case of error.

Fixes: f92ee619("xfrm: Generate blackhole routes only from route lookup functions")
Signed-off-by: default avatarhuaibin Wang <huaibin.wang@6wind.com>
Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent 044a832a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment