summaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_user.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-26 16:43:39 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-26 16:43:39 -0700
commit4d7de66e2cc508761f050d1d4eaca88a6e6f711e (patch)
tree6b9943c1fc07de4420f95fa935e470760545780c /net/xfrm/xfrm_user.c
parente93adf1e6554511a6194f4785fd29af8e41104db (diff)
parenta4f1bac62564049ea4718c4624b0fadc9f597c84 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/xfrm/xfrm_user.c')
-rw-r--r--net/xfrm/xfrm_user.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index ecade4893a1..8da3e25b2c4 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -1350,6 +1350,9 @@ static struct xfrm_policy *xfrm_compile_policy(u16 family, int opt,
if (nr > XFRM_MAX_DEPTH)
return NULL;
+ if (p->dir > XFRM_POLICY_OUT)
+ return NULL;
+
xp = xfrm_policy_alloc(GFP_KERNEL);
if (xp == NULL) {
*dir = -ENOBUFS;