Date: Wed, 1 Mar 1995 17:43:14 -0500 From: slr@mitre.org (Soochon Radee) To: rvetter@plains.nodak.edu, wollman@halloran-eldar.lcs.mit.edu Cc: freebsd-hackers@FreeBSD.org Subject: multicast forwarding workaround Message-ID: <v01510104ab7a98b43007@[128.29.113.163]>
next in thread | raw e-mail | index | archive | help
Because IGMP packets make it up to mrouted through normal IGMP channels, I've made a modification to ip_mforward and mrouted to allow the upcall to reach mrouted. Instead of telling raw_input that the mbuf should be passed to an IGMP-listening process, we can set the protocol of the IP packet to IGMP and pass it to rip_input instead. To mark the packet as a request for a new route, I set the IP version to 0 and have mrouted check appropriately. In the kernel: mwunix> diff ip_mroute.c.new ip_mroute.c 1118,1120c1118 < /* k_data->ip_p = 0; */ < k_data->ip_v = 0; < k_data->ip_p = IPPROTO_IGMP; --- > k_data->ip_p = 0; 1124c1122 < /* raw_input(mm, &k_igmpproto, --- > raw_input(mm, &k_igmpproto, 1126,1127c1124 < (struct sockaddr *)&k_igmpdst); */ < rip_input(mm); --- > (struct sockaddr *)&k_igmpdst); In the daemon: mwunix> diff igmp.c.new igmp.c 133c133 < if (ip->ip_v == 0) { --- > if (ip->ip_p == 0) { This works when compiled and run in our lab setup: ----net-A----------o o-----------net-B------o----------------- _|_____|_ ___|____ | fbsd | | sun | | mrouter | | mrouter| |_________| |________| lusty jocky The FreeBSD box (lusty) acts as a multicast router between networks A and B. jocky is the endpoint of a tunnel that connects to the mbone. Hosts on both networks are able to interact with each other and off-site computers when joined to the same multicast group. I realize this solution might not be the Right Thing to do, but I don't know enough about sockets (yet) to figure out why a routing control block isn't created for mrouted's raw socket in the rawcb circular list (in net/raw_usrreq.c). Unfortunately, I have run into a new problem: the FreeBSD mrouted will not send prunes. When mrouted on lusty is started, jocky grafts all of the groups it knows about. Shouldn't lusty immediately send IGMP prunes back to jocky, or am I understanding the code/specs wrong? (That is what jocky does with the other end of the tunnel). I am not sure if this is related to the change I made in the code, and I haven't been able to investigate on the sun. I am also not sure whether or not FreeBSD mrouted can act as the end of a multicast tunnel (either end) with non-FreeBSD systems. In ip_mroute.c, the initialization routines use protocol IPPROTO_ENCAP = 89, and not ENCAP_PROTO = 4, which is what the mrouted distribution uses. Soochon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?v01510104ab7a98b43007>