1/* 2 * IP multicast forwarding procedures 3 * 4 * Written by David Waitzman, BBN Labs, August 1988. 5 * Modified by Steve Deering, Stanford, February 1989. 6 * Modified by Mark J. Steiglitz, Stanford, May, 1991 7 * Modified by Van Jacobson, LBL, January 1993 8 * Modified by Ajit Thyagarajan, PARC, August 1993 9 * Modified by Bill Fenner, PARC, April 1995 10 * 11 * MROUTING Revision: 3.5 |
12 * $FreeBSD: head/sys/netinet/ip_mroute.c 105194 2002-10-16 01:54:46Z sam $ |
13 */ 14 15#include "opt_mrouting.h" 16#include "opt_random_ip_id.h" 17 18#include <sys/param.h> 19#include <sys/kernel.h> 20#include <sys/lock.h> --- 1850 unchanged lines hidden (view full) --- 1871 struct ip_moptions imo; 1872 int error; 1873 static struct route ro; 1874 int s = splnet(); 1875 1876 if (vifp->v_flags & VIFF_TUNNEL) { 1877 /* If tunnel options */ 1878 ip_output(m, (struct mbuf *)0, &vifp->v_route, |
1879 IP_FORWARDING, (struct ip_moptions *)0, NULL); |
1880 } else { 1881 imo.imo_multicast_ifp = vifp->v_ifp; 1882 imo.imo_multicast_ttl = mtod(m, struct ip *)->ip_ttl - 1; 1883 imo.imo_multicast_loop = 1; 1884 imo.imo_multicast_vif = -1; 1885 1886 /* 1887 * Re-entrancy should not be a problem here, because 1888 * the packets that we send out and are looped back at us 1889 * should get rejected because they appear to come from 1890 * the loopback interface, thus preventing looping. 1891 */ 1892 error = ip_output(m, (struct mbuf *)0, &ro, |
1893 IP_FORWARDING, &imo, NULL); |
1894 1895 if (mrtdebug & DEBUG_XMIT) 1896 log(LOG_DEBUG, "phyint_send on vif %d err %d\n", 1897 vifp - viftable, error); 1898 } 1899 splx(s); 1900} 1901 --- 356 unchanged lines hidden --- |