diff options
Diffstat (limited to 'net/xfrm')
-rw-r--r-- | net/xfrm/Kconfig | 15 | ||||
-rw-r--r-- | net/xfrm/xfrm_user.c | 3 |
2 files changed, 18 insertions, 0 deletions
diff --git a/net/xfrm/Kconfig b/net/xfrm/Kconfig index 58ca6a972c..0c1c04322b 100644 --- a/net/xfrm/Kconfig +++ b/net/xfrm/Kconfig | |||
@@ -1,6 +1,10 @@ | |||
1 | # | 1 | # |
2 | # XFRM configuration | 2 | # XFRM configuration |
3 | # | 3 | # |
4 | config XFRM | ||
5 | bool | ||
6 | depends on NET | ||
7 | |||
4 | config XFRM_USER | 8 | config XFRM_USER |
5 | tristate "IPsec user configuration interface" | 9 | tristate "IPsec user configuration interface" |
6 | depends on INET && XFRM | 10 | depends on INET && XFRM |
@@ -10,3 +14,14 @@ config XFRM_USER | |||
10 | 14 | ||
11 | If unsure, say Y. | 15 | If unsure, say Y. |
12 | 16 | ||
17 | config NET_KEY | ||
18 | tristate "PF_KEY sockets" | ||
19 | select XFRM | ||
20 | ---help--- | ||
21 | PF_KEYv2 socket family, compatible to KAME ones. | ||
22 | They are required if you are going to use IPsec tools ported | ||
23 | from KAME. | ||
24 | |||
25 | Say Y unless you know what you are doing. | ||
26 | |||
27 | |||
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index ecade4893a..8da3e25b2c 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, | |||
1350 | if (nr > XFRM_MAX_DEPTH) | 1350 | if (nr > XFRM_MAX_DEPTH) |
1351 | return NULL; | 1351 | return NULL; |
1352 | 1352 | ||
1353 | if (p->dir > XFRM_POLICY_OUT) | ||
1354 | return NULL; | ||
1355 | |||
1353 | xp = xfrm_policy_alloc(GFP_KERNEL); | 1356 | xp = xfrm_policy_alloc(GFP_KERNEL); |
1354 | if (xp == NULL) { | 1357 | if (xp == NULL) { |
1355 | *dir = -ENOBUFS; | 1358 | *dir = -ENOBUFS; |