diff options
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/xfrm4_mode_beet.c | 5 | ||||
-rw-r--r-- | net/ipv4/xfrm4_mode_tunnel.c | 6 |
2 files changed, 3 insertions, 8 deletions
diff --git a/net/ipv4/xfrm4_mode_beet.c b/net/ipv4/xfrm4_mode_beet.c index 63418185f524..e3db3f915114 100644 --- a/net/ipv4/xfrm4_mode_beet.c +++ b/net/ipv4/xfrm4_mode_beet.c | |||
@@ -110,10 +110,7 @@ static int xfrm4_beet_input(struct xfrm_state *x, struct sk_buff *skb) | |||
110 | 110 | ||
111 | skb_push(skb, sizeof(*iph)); | 111 | skb_push(skb, sizeof(*iph)); |
112 | skb_reset_network_header(skb); | 112 | skb_reset_network_header(skb); |
113 | 113 | skb_mac_header_rebuild(skb); | |
114 | memmove(skb->data - skb->mac_len, skb_mac_header(skb), | ||
115 | skb->mac_len); | ||
116 | skb_set_mac_header(skb, -skb->mac_len); | ||
117 | 114 | ||
118 | xfrm4_beet_make_header(skb); | 115 | xfrm4_beet_make_header(skb); |
119 | 116 | ||
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: |