[PATCH] 2.5.64 multicast: find interface correctly

From: Ted Phelps (phelps@dstc.edu.au)
Date: Sat Mar 08 2003 - 18:49:51 EST


Joining a multicast group (IP_ADD_MEMBERSHIP) with the imr_interface
set to INADDR_ANY binds to the loopback interface. This differs from
the 2.4 behavior and appears to be because ip_mc_find_dev() calls
ip_route_output_key() with the interface address (0.0.0.0) rather than
the multicast address (which 2.4 kernels use). The following patch
reverts to the linux-2.4 behavior.

Thanks,
-Ted

---8<---

--- linux-2.5.63/net/ipv4/igmp.c 2003-02-26 22:28:36.000000000 +0000
+++ linux-2.5.64/net/ipv4/igmp.c 2003-03-08 22:52:38.000000000 +0000
@@ -618,6 +618,7 @@
                 __dev_put(dev);
         }
 
+ fl.nl_u.ip4_u.daddr = imr->imr_multiaddr.s_addr;
         if (!dev && !ip_route_output_key(&rt, &fl)) {
                 dev = rt->u.dst.dev;
                 ip_rt_put(rt);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Mar 15 2003 - 22:00:16 EST