diff options
Diffstat (limited to 'net/xfrm/xfrm_user.c')
-rw-r--r-- | net/xfrm/xfrm_user.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 3a83c5987c26..770bd2410749 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
@@ -28,6 +28,9 @@ | |||
28 | #include <net/xfrm.h> | 28 | #include <net/xfrm.h> |
29 | #include <net/netlink.h> | 29 | #include <net/netlink.h> |
30 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
31 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | ||
32 | #include <linux/in6.h> | ||
33 | #endif | ||
31 | 34 | ||
32 | static int verify_one_alg(struct rtattr **xfrma, enum xfrm_attr_type_t type) | 35 | static int verify_one_alg(struct rtattr **xfrma, enum xfrm_attr_type_t type) |
33 | { | 36 | { |
@@ -173,6 +176,19 @@ static int verify_newsa_info(struct xfrm_usersa_info *p, | |||
173 | goto out; | 176 | goto out; |
174 | break; | 177 | break; |
175 | 178 | ||
179 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | ||
180 | case IPPROTO_DSTOPTS: | ||
181 | case IPPROTO_ROUTING: | ||
182 | if (xfrma[XFRMA_ALG_COMP-1] || | ||
183 | xfrma[XFRMA_ALG_AUTH-1] || | ||
184 | xfrma[XFRMA_ALG_CRYPT-1] || | ||
185 | xfrma[XFRMA_ENCAP-1] || | ||
186 | xfrma[XFRMA_SEC_CTX-1] || | ||
187 | !xfrma[XFRMA_COADDR-1]) | ||
188 | goto out; | ||
189 | break; | ||
190 | #endif | ||
191 | |||
176 | default: | 192 | default: |
177 | goto out; | 193 | goto out; |
178 | }; | 194 | }; |