aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorPravin B Shelar <pshelar@nicira.com>2013-06-17 20:50:02 -0400
committerDavid S. Miller <davem@davemloft.net>2013-06-19 21:07:41 -0400
commit3d7b46cd20e300bd6989fb1f43d46f1b9645816e (patch)
treeb8a063f8ecb7e380f0e1672a60815ff48c3f9b56 /net/ipv6
parent0e6fbc5b6c6218987c93b8c7ca60cf786062899d (diff)
ip_tunnel: push generic protocol handling to ip_tunnel module.
Process skb tunnel header before sending packet to protocol handler. this allows code sharing between gre and ovs gre modules. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/sit.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 76bb8de435b2..6cee844678e2 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -640,9 +640,14 @@ static const struct tnl_ptk_info tpi = {
640 640
641static int ipip_rcv(struct sk_buff *skb) 641static int ipip_rcv(struct sk_buff *skb)
642{ 642{
643 const struct iphdr *iph = ip_hdr(skb); 643 const struct iphdr *iph;
644 struct ip_tunnel *tunnel; 644 struct ip_tunnel *tunnel;
645 645
646 if (iptunnel_pull_header(skb, 0, tpi.proto))
647 goto drop;
648
649 iph = ip_hdr(skb);
650
646 tunnel = ipip6_tunnel_lookup(dev_net(skb->dev), skb->dev, 651 tunnel = ipip6_tunnel_lookup(dev_net(skb->dev), skb->dev,
647 iph->saddr, iph->daddr); 652 iph->saddr, iph->daddr);
648 if (tunnel != NULL) { 653 if (tunnel != NULL) {