Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 81861
b: refs/heads/master
c: 2614fa5
h: refs/heads/master
i:
  81859: 7af3ee6
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Feb 1, 2008
1 parent 8664537 commit 1c8f4fd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 936f6f8e1bc46834bbb3e3fa3ac13ab44f1e7ba6
refs/heads/master: 2614fa59fa805cd488083c5602eb48533cdbc018
5 changes: 4 additions & 1 deletion trunk/net/ipv4/ipcomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ static int ipcomp_decompress(struct xfrm_state *x, struct sk_buff *skb)

static int ipcomp_input(struct xfrm_state *x, struct sk_buff *skb)
{
int nexthdr;
int err = -ENOMEM;
struct ip_comp_hdr *ipch;

Expand All @@ -84,13 +85,15 @@ static int ipcomp_input(struct xfrm_state *x, struct sk_buff *skb)

/* Remove ipcomp header and decompress original payload */
ipch = (void *)skb->data;
nexthdr = ipch->nexthdr;

skb->transport_header = skb->network_header + sizeof(*ipch);
__skb_pull(skb, sizeof(*ipch));
err = ipcomp_decompress(x, skb);
if (err)
goto out;

err = ipch->nexthdr;
err = nexthdr;

out:
return err;
Expand Down
5 changes: 4 additions & 1 deletion trunk/net/ipv6/ipcomp6.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ static LIST_HEAD(ipcomp6_tfms_list);

static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb)
{
int nexthdr;
int err = -ENOMEM;
struct ip_comp_hdr *ipch;
int plen, dlen;
Expand All @@ -79,6 +80,8 @@ static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb)

/* Remove ipcomp header and decompress original payload */
ipch = (void *)skb->data;
nexthdr = ipch->nexthdr;

skb->transport_header = skb->network_header + sizeof(*ipch);
__skb_pull(skb, sizeof(*ipch));

Expand Down Expand Up @@ -108,7 +111,7 @@ static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb)
skb->truesize += dlen - plen;
__skb_put(skb, dlen - plen);
skb_copy_to_linear_data(skb, scratch, dlen);
err = ipch->nexthdr;
err = nexthdr;

out_put_cpu:
put_cpu();
Expand Down

0 comments on commit 1c8f4fd

Please sign in to comment.