diff options
Diffstat (limited to 'net/ipv6/ipcomp6.c')
-rw-r--r-- | net/ipv6/ipcomp6.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c index a81e9e9d93bd..ad9c6e824e62 100644 --- a/net/ipv6/ipcomp6.c +++ b/net/ipv6/ipcomp6.c | |||
@@ -212,7 +212,7 @@ static struct xfrm_state *ipcomp6_tunnel_create(struct xfrm_state *x) | |||
212 | memcpy(t->id.daddr.a6, x->id.daddr.a6, sizeof(struct in6_addr)); | 212 | memcpy(t->id.daddr.a6, x->id.daddr.a6, sizeof(struct in6_addr)); |
213 | memcpy(&t->sel, &x->sel, sizeof(t->sel)); | 213 | memcpy(&t->sel, &x->sel, sizeof(t->sel)); |
214 | t->props.family = AF_INET6; | 214 | t->props.family = AF_INET6; |
215 | t->props.mode = 1; | 215 | t->props.mode = XFRM_MODE_TUNNEL; |
216 | memcpy(t->props.saddr.a6, x->props.saddr.a6, sizeof(struct in6_addr)); | 216 | memcpy(t->props.saddr.a6, x->props.saddr.a6, sizeof(struct in6_addr)); |
217 | 217 | ||
218 | if (xfrm_init_state(t)) | 218 | if (xfrm_init_state(t)) |
@@ -417,7 +417,7 @@ static int ipcomp6_init_state(struct xfrm_state *x) | |||
417 | goto out; | 417 | goto out; |
418 | 418 | ||
419 | x->props.header_len = 0; | 419 | x->props.header_len = 0; |
420 | if (x->props.mode) | 420 | if (x->props.mode == XFRM_MODE_TUNNEL) |
421 | x->props.header_len += sizeof(struct ipv6hdr); | 421 | x->props.header_len += sizeof(struct ipv6hdr); |
422 | 422 | ||
423 | mutex_lock(&ipcomp6_resource_mutex); | 423 | mutex_lock(&ipcomp6_resource_mutex); |
@@ -429,7 +429,7 @@ static int ipcomp6_init_state(struct xfrm_state *x) | |||
429 | goto error; | 429 | goto error; |
430 | mutex_unlock(&ipcomp6_resource_mutex); | 430 | mutex_unlock(&ipcomp6_resource_mutex); |
431 | 431 | ||
432 | if (x->props.mode) { | 432 | if (x->props.mode == XFRM_MODE_TUNNEL) { |
433 | err = ipcomp6_tunnel_attach(x); | 433 | err = ipcomp6_tunnel_attach(x); |
434 | if (err) | 434 | if (err) |
435 | goto error_tunnel; | 435 | goto error_tunnel; |
@@ -461,6 +461,7 @@ static struct xfrm_type ipcomp6_type = | |||
461 | .destructor = ipcomp6_destroy, | 461 | .destructor = ipcomp6_destroy, |
462 | .input = ipcomp6_input, | 462 | .input = ipcomp6_input, |
463 | .output = ipcomp6_output, | 463 | .output = ipcomp6_output, |
464 | .hdr_offset = xfrm6_find_1stfragopt, | ||
464 | }; | 465 | }; |
465 | 466 | ||
466 | static struct inet6_protocol ipcomp6_protocol = | 467 | static struct inet6_protocol ipcomp6_protocol = |