[IPV4]: Add 'rtable' field in struct sk_buff to alias 'dst' and avoid casts
[deliverable/linux.git] / net / ipv4 / ip_gre.c
index e7821ba7a9a05886d49f7078244371ab321461bd..f9ee84420cb33005798f47c87e98bf01d5bc7216 100644 (file)
@@ -619,7 +619,7 @@ static int ipgre_rcv(struct sk_buff *skb)
 #ifdef CONFIG_NET_IPGRE_BROADCAST
                if (ipv4_is_multicast(iph->daddr)) {
                        /* Looped back packet, drop it! */
-                       if (((struct rtable*)skb->dst)->fl.iif == 0)
+                       if (skb->rtable->fl.iif == 0)
                                goto drop;
                        tunnel->stat.multicast++;
                        skb->pkt_type = PACKET_BROADCAST;
@@ -699,7 +699,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
                }
 
                if (skb->protocol == htons(ETH_P_IP)) {
-                       rt = (struct rtable*)skb->dst;
+                       rt = skb->rtable;
                        if ((dst = rt->rt_gateway) == 0)
                                goto tx_error_icmp;
                }
This page took 0.027003 seconds and 5 git commands to generate.