git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[IPSEC]: Disallow combinations of RO and AH/ESP/IPCOMP
[safe/jmp/linux-2.6]
/
net
/
ipv6
/
ipcomp6.c
diff --git
a/net/ipv6/ipcomp6.c
b/net/ipv6/ipcomp6.c
index
28fc8ed
..
80ef2a1
100644
(file)
--- a/
net/ipv6/ipcomp6.c
+++ b/
net/ipv6/ipcomp6.c
@@
-411,8
+411,15
@@
static int ipcomp6_init_state(struct xfrm_state *x)
goto out;
x->props.header_len = 0;
goto out;
x->props.header_len = 0;
- if (x->props.mode == XFRM_MODE_TUNNEL)
+ switch (x->props.mode) {
+ case XFRM_MODE_BEET:
+ case XFRM_MODE_TRANSPORT:
+ break;
+ case XFRM_MODE_TUNNEL:
x->props.header_len += sizeof(struct ipv6hdr);
x->props.header_len += sizeof(struct ipv6hdr);
+ default:
+ goto error;
+ }
mutex_lock(&ipcomp6_resource_mutex);
if (!ipcomp6_alloc_scratches())
mutex_lock(&ipcomp6_resource_mutex);
if (!ipcomp6_alloc_scratches())