Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[deliverable/linux.git] / net / ipv4 / igmp.c
index 12b65ccca8e9e6aa18e25f22f336485b087a3e09..1fd3d9ce8398053588a45086ba813adfc7744de4 100644 (file)
@@ -321,15 +321,12 @@ static struct sk_buff *igmpv3_newpack(struct net_device *dev, int size)
        }
        igmp_skb_size(skb) = size;
 
-       {
-               struct flowi fl = { .oif = dev->ifindex,
-                                   .fl4_dst = IGMPV3_ALL_MCR,
-                                   .proto = IPPROTO_IGMP };
-               rt = ip_route_output_key(net, &fl);
-               if (IS_ERR(rt)) {
-                       kfree_skb(skb);
-                       return NULL;
-               }
+       rt = ip_route_output_ports(net, NULL, IGMPV3_ALL_MCR, 0,
+                                  0, 0,
+                                  IPPROTO_IGMP, 0, dev->ifindex);
+       if (IS_ERR(rt)) {
+               kfree_skb(skb);
+               return NULL;
        }
        if (rt->rt_src == 0) {
                kfree_skb(skb);
@@ -667,14 +664,12 @@ static int igmp_send_report(struct in_device *in_dev, struct ip_mc_list *pmc,
        else
                dst = group;
 
-       {
-               struct flowi fl = { .oif = dev->ifindex,
-                                   .fl4_dst = dst,
-                                   .proto = IPPROTO_IGMP };
-               rt = ip_route_output_key(net, &fl);
-               if (IS_ERR(rt))
-                       return -1;
-       }
+       rt = ip_route_output_ports(net, NULL, dst, 0,
+                                  0, 0,
+                                  IPPROTO_IGMP, 0, dev->ifindex);
+       if (IS_ERR(rt))
+               return -1;
+
        if (rt->rt_src == 0) {
                ip_rt_put(rt);
                return -1;
@@ -1441,7 +1436,6 @@ void ip_mc_destroy_dev(struct in_device *in_dev)
 /* RTNL is locked */
 static struct in_device *ip_mc_find_dev(struct net *net, struct ip_mreqn *imr)
 {
-       struct flowi fl = { .fl4_dst = imr->imr_multiaddr.s_addr };
        struct net_device *dev = NULL;
        struct in_device *idev = NULL;
 
@@ -1456,7 +1450,9 @@ static struct in_device *ip_mc_find_dev(struct net *net, struct ip_mreqn *imr)
        }
 
        if (!dev) {
-               struct rtable *rt = ip_route_output_key(net, &fl);
+               struct rtable *rt = ip_route_output(net,
+                                                   imr->imr_multiaddr.s_addr,
+                                                   0, 0, 0);
                if (!IS_ERR(rt)) {
                        dev = rt->dst.dev;
                        ip_rt_put(rt);
This page took 0.028491 seconds and 5 git commands to generate.