[IPV4]: cleanup
[linux-block.git] / net / ipv4 / xfrm4_mode_tunnel.c
index e1cab33fdad1333506ce906b453e11ec8feee6bc..4872b30ba5d83e5501b3039637257072e7b08929 100644 (file)
@@ -93,7 +93,7 @@ static int xfrm4_tunnel_input(struct xfrm_state *x, struct sk_buff *skb)
        struct iphdr *iph = skb->nh.iph;
        int err = -EINVAL;
 
-       switch(iph->protocol){
+       switch (iph->protocol){
                case IPPROTO_IPIP:
                        break;
 #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
@@ -111,6 +111,7 @@ static int xfrm4_tunnel_input(struct xfrm_state *x, struct sk_buff *skb)
            (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC)))
                goto out;
 
+       iph = skb->nh.iph;
        if (iph->protocol == IPPROTO_IPIP) {
                if (x->props.flags & XFRM_STATE_DECAP_DSCP)
                        ipv4_copy_dscp(iph, skb->h.ipiph);