Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107948
b: refs/heads/master
c: eb49e63
h: refs/heads/master
v: v3
  • Loading branch information
Joakim Koskela authored and David S. Miller committed Aug 6, 2008
1 parent f4d556b commit aac8d10
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 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: 9714be7da8b32f36d2468fe08ff603b6402df8cf
refs/heads/master: eb49e63093498cd17382018495b8cfb5b4a679bd
2 changes: 1 addition & 1 deletion trunk/net/ipv4/esp4.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ static int esp_init_state(struct xfrm_state *x)
crypto_aead_ivsize(aead);
if (x->props.mode == XFRM_MODE_TUNNEL)
x->props.header_len += sizeof(struct iphdr);
else if (x->props.mode == XFRM_MODE_BEET)
else if (x->props.mode == XFRM_MODE_BEET && x->sel.family != AF_INET6)
x->props.header_len += IPV4_BEET_PHMAXLEN;
if (x->encap) {
struct xfrm_encap_tmpl *encap = x->encap;
Expand Down
6 changes: 4 additions & 2 deletions trunk/net/ipv4/xfrm4_mode_beet.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ static int xfrm4_beet_output(struct xfrm_state *x, struct sk_buff *skb)
if (unlikely(optlen))
hdrlen += IPV4_BEET_PHMAXLEN - (optlen & 4);

skb_set_network_header(skb, IPV4_BEET_PHMAXLEN - x->props.header_len -
hdrlen);
skb_set_network_header(skb, -x->props.header_len -
hdrlen + (XFRM_MODE_SKB_CB(skb)->ihl - sizeof(*top_iph)));
if (x->sel.family != AF_INET6)
skb->network_header += IPV4_BEET_PHMAXLEN;
skb->mac_header = skb->network_header +
offsetof(struct iphdr, protocol);
skb->transport_header = skb->network_header + sizeof(*top_iph);
Expand Down

0 comments on commit aac8d10

Please sign in to comment.