Date: Thu, 2 Mar 1995 18:19:55 -0600 From: Mark Tinguely <tinguely@plains.nodak.edu> To: slr@mitre.org, wollman@halloran-eldar.lcs.mit.edu Cc: ajit@udel.edu, atn-group@mitre.org, freebsd-hackers@FreeBSD.org Subject: Re: multicast pruning Message-ID: <199503030019.AA29879@plains.NoDak.edu>
next in thread | raw e-mail | index | archive | help
good job on the prune solution. can you automatically pick up new groups from the tunnel? I don't know if there is still a bug or if my regional net is having a problem. I think the entries in /usr/src/usr.sbin/mrouted/main.c: *** main.c.orig Thu Mar 2 18:16:13 1995 --- main.c Thu Mar 2 18:16:37 1995 *************** *** 24,33 **** extern char *configfilename; ! static char pidfilename[] = "/etc/mrouted.pid"; ! static char dumpfilename[] = "/usr/tmp/mrouted.dump"; ! static char cachefilename[] = "/usr/tmp/mrouted.cache"; ! static char genidfilename[] = "/usr/tmp/mrouted.genid"; int cache_lifetime = DEFAULT_CACHE_LIFETIME; int max_prune_lifetime = DEFAULT_CACHE_LIFETIME * 2; --- 24,33 ---- extern char *configfilename; ! static char pidfilename[] = "/var/run/mrouted.pid"; ! static char dumpfilename[] = "/var/tmp/mrouted.dump"; ! static char cachefilename[] = "/var/tmp/mrouted.cache"; ! static char genidfilename[] = "/var/tmp/mrouted.genid"; int cache_lifetime = DEFAULT_CACHE_LIFETIME; int max_prune_lifetime = DEFAULT_CACHE_LIFETIME * 2; instead of changing the ip->ip_p in /sys/netinet/ip_mroute.c and in /usr/src/usr.sbin/mrouted/igmp.c when adding the groups, I had tucked the packet down the raw socket stored in ip_mrouter; this has the advantage of not making all of the utilities (mrinfo, map-mbone, mtrace) that also have raw sockets open to have to throw out the extra packet: *** ip_mroute.c.orig Thu Mar 2 18:01:24 1995 --- ip_mroute.c Thu Mar 2 18:05:43 1995 *************** *** 1119,1127 **** mrtstat.mrts_upcalls++; ! raw_input(mm, &k_igmpproto, ! (struct sockaddr *)&k_igmpsrc, ! (struct sockaddr *)&k_igmpdst); /* set timer to cleanup entry if upcall is lost */ timeout(cleanup_cache, (caddr_t)mb_rt, 100); --- 1119,1125 ---- mrtstat.mrts_upcalls++; ! raw_ip_input(mm, ip_mrouter, (struct sockaddr *)&k_igmpsrc); /* set timer to cleanup entry if upcall is lost */ timeout(cleanup_cache, (caddr_t)mb_rt, 100); *** raw_ip.c.orig Tue Feb 21 16:33:49 1995 --- raw_ip.c Tue Feb 28 14:36:47 1995 *************** *** 96,105 **** if (inp->inp_ip.ip_p && inp->inp_ip.ip_p != ip->ip_p) continue; if (inp->inp_laddr.s_addr && ! inp->inp_laddr.s_addr == ip->ip_dst.s_addr) continue; if (inp->inp_faddr.s_addr && ! inp->inp_faddr.s_addr == ip->ip_src.s_addr) continue; if (last) { struct mbuf *n = m_copy(m, 0, (int)M_COPYALL); --- 96,105 ---- if (inp->inp_ip.ip_p && inp->inp_ip.ip_p != ip->ip_p) continue; if (inp->inp_laddr.s_addr && ! inp->inp_laddr.s_addr != ip->ip_dst.s_addr) continue; if (inp->inp_faddr.s_addr && ! inp->inp_faddr.s_addr != ip->ip_src.s_addr) continue; if (last) { struct mbuf *n = m_copy(m, 0, (int)M_COPYALL); *************** *** 427,430 **** --- 427,452 ---- if (m != NULL) m_freem(m); return (error); + } + /* + * Raw protocol input routine using the know mrouted raw socket + */ + void + raw_ip_input(m, socket, src) + struct mbuf *m; + register struct socket *socket; + struct sockaddr *src; + { + if (socket) { + if (sbappendaddr(&socket->so_rcv, src, + m, (struct mbuf *)0) == 0) + m_freem(m); + else { + sorwakeup(socket); + } + } else { + m_freem(m); + ipstat.ips_noproto++; + ipstat.ips_delivered--; + } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503030019.AA29879>