Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[deliverable/linux.git] / net / ipv4 / ipip.c
index a5f58e7cbb26eec188786ff1324cfc540aba1ce1..65008f45addcc608fcc92bb3978be3af04a7233d 100644 (file)
@@ -469,7 +469,8 @@ static netdev_tx_t ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
                        .proto = IPPROTO_IPIP
                };
 
-               if (ip_route_output_key(dev_net(dev), &rt, &fl)) {
+               rt = ip_route_output_key(dev_net(dev), &fl);
+               if (IS_ERR(rt)) {
                        dev->stats.tx_carrier_errors++;
                        goto tx_error_icmp;
                }
@@ -590,9 +591,9 @@ static void ipip_tunnel_bind_dev(struct net_device *dev)
                        .fl4_tos = RT_TOS(iph->tos),
                        .proto = IPPROTO_IPIP
                };
-               struct rtable *rt;
+               struct rtable *rt = ip_route_output_key(dev_net(dev), &fl);
 
-               if (!ip_route_output_key(dev_net(dev), &rt, &fl)) {
+               if (!IS_ERR(rt)) {
                        tdev = rt->dst.dev;
                        ip_rt_put(rt);
                }
This page took 0.023876 seconds and 5 git commands to generate.