diff options
Diffstat (limited to 'net/ipv4/xfrm4_mode_beet.c')
-rw-r--r-- | net/ipv4/xfrm4_mode_beet.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/net/ipv4/xfrm4_mode_beet.c b/net/ipv4/xfrm4_mode_beet.c index e42e122414be..94842adce144 100644 --- a/net/ipv4/xfrm4_mode_beet.c +++ b/net/ipv4/xfrm4_mode_beet.c | |||
@@ -43,7 +43,17 @@ static int xfrm4_beet_output(struct xfrm_state *x, struct sk_buff *skb) | |||
43 | ph = (struct ip_beet_phdr *)__skb_pull(skb, sizeof(*iph) - hdrlen); | 43 | ph = (struct ip_beet_phdr *)__skb_pull(skb, sizeof(*iph) - hdrlen); |
44 | 44 | ||
45 | top_iph = ip_hdr(skb); | 45 | top_iph = ip_hdr(skb); |
46 | memmove(top_iph, iph, sizeof(*iph)); | 46 | |
47 | top_iph->ihl = 5; | ||
48 | top_iph->version = 4; | ||
49 | |||
50 | top_iph->protocol = XFRM_MODE_SKB_CB(skb)->protocol; | ||
51 | top_iph->tos = XFRM_MODE_SKB_CB(skb)->tos; | ||
52 | |||
53 | top_iph->id = XFRM_MODE_SKB_CB(skb)->id; | ||
54 | top_iph->frag_off = XFRM_MODE_SKB_CB(skb)->frag_off; | ||
55 | top_iph->ttl = XFRM_MODE_SKB_CB(skb)->ttl; | ||
56 | |||
47 | if (unlikely(optlen)) { | 57 | if (unlikely(optlen)) { |
48 | BUG_ON(optlen < 0); | 58 | BUG_ON(optlen < 0); |
49 | 59 | ||
@@ -111,7 +121,8 @@ out: | |||
111 | 121 | ||
112 | static struct xfrm_mode xfrm4_beet_mode = { | 122 | static struct xfrm_mode xfrm4_beet_mode = { |
113 | .input = xfrm4_beet_input, | 123 | .input = xfrm4_beet_input, |
114 | .output = xfrm4_beet_output, | 124 | .output2 = xfrm4_beet_output, |
125 | .output = xfrm4_prepare_output, | ||
115 | .owner = THIS_MODULE, | 126 | .owner = THIS_MODULE, |
116 | .encap = XFRM_MODE_BEET, | 127 | .encap = XFRM_MODE_BEET, |
117 | .flags = XFRM_MODE_FLAG_TUNNEL, | 128 | .flags = XFRM_MODE_FLAG_TUNNEL, |