X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=net%2Fipv6%2Fipcomp6.c;h=80ef2a1d39fd56704fef43e47a8c80456ce0a587;hb=ca68145f16359f71cd62b2671aa3e8c58f45ef19;hp=28fc8edfdc3aa63f24f85df71869809d27df7e71;hpb=ed3e37ddb0b422120d3d2d5da718c44c40af30ba;p=safe%2Fjmp%2Flinux-2.6 diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c index 28fc8ed..80ef2a1 100644 --- 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; - 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); + default: + goto error; + } mutex_lock(&ipcomp6_resource_mutex); if (!ipcomp6_alloc_scratches())