summaryrefslogtreecommitdiffstats
path: root/net/ipv4/xfrm4_mode_tunnel.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-03-08 09:33:44 -0800
committerOlof Johansson <olof@lixom.net>2012-03-08 09:33:44 -0800
commit990b07d952bff7116ba79e3c4ceeae5dd8d5ec3d (patch)
treeb0f6c896749f5beca20d74e72e4761aaa9e8ad2b /net/ipv4/xfrm4_mode_tunnel.c
parent3a70b7e05f62d4e1bfd5744368ea1fd855b6e03c (diff)
parent8a16a701ad787b6db2949766341c5ad1b551de9f (diff)
downloadlinux-990b07d952bff7116ba79e3c4ceeae5dd8d5ec3d.tar.gz
linux-990b07d952bff7116ba79e3c4ceeae5dd8d5ec3d.tar.bz2
linux-990b07d952bff7116ba79e3c4ceeae5dd8d5ec3d.zip
Merge branch 'regulator' of git://github.com/hzhuang1/linux into next/drivers
* 'regulator' of git://github.com/hzhuang1/linux: (2 commits) regulator: Remove bq24022 regulator driver pxa: magician/hx4700: Convert to gpio-regulator from bq24022 (plus update to v3.3-rc6)
Diffstat (limited to 'net/ipv4/xfrm4_mode_tunnel.c')
-rw-r--r--net/ipv4/xfrm4_mode_tunnel.c6
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)
static int xfrm4_mode_tunnel_input(struct xfrm_state *x, struct sk_buff *skb)
{
- const unsigned char *old_mac;
int err = -EINVAL;
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)
if (!(x->props.flags & XFRM_STATE_NOECN))
ipip_ecn_decapsulate(skb);
- old_mac = skb_mac_header(skb);
- skb_set_mac_header(skb, -skb->mac_len);
- memmove(skb_mac_header(skb), old_mac, skb->mac_len);
skb_reset_network_header(skb);
+ skb_mac_header_rebuild(skb);
+
err = 0;
out: