summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorhuaibin Wang <huaibin.wang@6wind.com>2015-02-11 18:10:36 +0100
committerJiri Slaby <jslaby@suse.cz>2015-07-30 13:21:26 +0200
commit423f5859ddcf47699f336e063cf6a6d8bc2e93e5 (patch)
tree3a534c86b9b029c1dccb97e8b3b7562bfc0074f0 /include
parent90fccfbc9a39ca6e805a9016090a7081b16a1793 (diff)
xfrm: release dst_orig in case of error in xfrm_lookup()
commit ac37e2515c1a89c477459a2020b6bfdedabdb91b upstream. 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: f92ee61982d("xfrm: Generate blackhole routes only from route lookup functions") Signed-off-by: huaibin Wang <huaibin.wang@6wind.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Jiri Slaby <jslaby@suse.com>
Diffstat (limited to 'include')
-rw-r--r--include/net/dst.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/dst.h b/include/net/dst.h
index 9c123761efc1..30cd2f9cd1dd 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -469,6 +469,7 @@ extern void dst_init(void);
enum {
XFRM_LOOKUP_ICMP = 1 << 0,
XFRM_LOOKUP_QUEUE = 1 << 1,
+ XFRM_LOOKUP_KEEP_DST_REF = 1 << 2,
};
struct flowi;