Commit 23c50109 authored by Herbert Xu's avatar Herbert Xu Committed by Stephen Hemminger

[IPIP]: Decapsulate after checking policy.

parent 6ab5c9ad
......@@ -475,11 +475,6 @@ static int ipip_rcv(struct sk_buff *skb)
goto out;
iph = skb->nh.iph;
skb->mac.raw = skb->nh.raw;
skb->nh.raw = skb->data;
memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options));
skb->protocol = htons(ETH_P_IP);
skb->pkt_type = PACKET_HOST;
read_lock(&ipip_lock);
if ((tunnel = ipip_tunnel_lookup(iph->saddr, iph->daddr)) != NULL) {
......@@ -488,6 +483,12 @@ static int ipip_rcv(struct sk_buff *skb)
return 0;
}
skb->mac.raw = skb->nh.raw;
skb->nh.raw = skb->data;
memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options));
skb->protocol = htons(ETH_P_IP);
skb->pkt_type = PACKET_HOST;
tunnel->stat.rx_packets++;
tunnel->stat.rx_bytes += skb->len;
skb->dev = tunnel->dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment