diff options
Diffstat (limited to 'net/ipv4/xfrm4_mode_tunnel.c')
-rw-r--r-- | net/ipv4/xfrm4_mode_tunnel.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv4/xfrm4_mode_tunnel.c b/net/ipv4/xfrm4_mode_tunnel.c index 534972e114ac..ed4bf11ef9f4 100644 --- a/net/ipv4/xfrm4_mode_tunnel.c +++ b/net/ipv4/xfrm4_mode_tunnel.c | |||
@@ -66,7 +66,6 @@ static int xfrm4_mode_tunnel_output(struct xfrm_state *x, struct sk_buff *skb) | |||
66 | 66 | ||
67 | static int xfrm4_mode_tunnel_input(struct xfrm_state *x, struct sk_buff *skb) | 67 | static int xfrm4_mode_tunnel_input(struct xfrm_state *x, struct sk_buff *skb) |
68 | { | 68 | { |
69 | const unsigned char *old_mac; | ||
70 | int err = -EINVAL; | 69 | int err = -EINVAL; |
71 | 70 | ||
72 | if (XFRM_MODE_SKB_CB(skb)->protocol != IPPROTO_IPIP) | 71 | if (XFRM_MODE_SKB_CB(skb)->protocol != IPPROTO_IPIP) |
@@ -84,10 +83,9 @@ static int xfrm4_mode_tunnel_input(struct xfrm_state *x, struct sk_buff *skb) | |||
84 | if (!(x->props.flags & XFRM_STATE_NOECN)) | 83 | if (!(x->props.flags & XFRM_STATE_NOECN)) |
85 | ipip_ecn_decapsulate(skb); | 84 | ipip_ecn_decapsulate(skb); |
86 | 85 | ||
87 | old_mac = skb_mac_header(skb); | ||
88 | skb_set_mac_header(skb, -skb->mac_len); | ||
89 | memmove(skb_mac_header(skb), old_mac, skb->mac_len); | ||
90 | skb_reset_network_header(skb); | 86 | skb_reset_network_header(skb); |
87 | skb_mac_header_rebuild(skb); | ||
88 | |||
91 | err = 0; | 89 | err = 0; |
92 | 90 | ||
93 | out: | 91 | out: |