ip_mroute.c (121446) | ip_mroute.c (121700) |
---|---|
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 * Modified by Ahmed Helmy, SGI, June 1996 11 * Modified by George Edmond Eddy (Rusty), ISI, February 1998 12 * Modified by Pavlin Radoslavov, USC/ISI, May 1998, August 1999, October 2000 13 * Modified by Hitoshi Asaeda, WIDE, August 2000 14 * Modified by Pavlin Radoslavov, ICSI, October 2002 15 * 16 * MROUTING Revision: 3.5 17 * and PIM-SMv2 and PIM-DM support, advanced API support, 18 * bandwidth metering and signaling 19 * | 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 * Modified by Ahmed Helmy, SGI, June 1996 11 * Modified by George Edmond Eddy (Rusty), ISI, February 1998 12 * Modified by Pavlin Radoslavov, USC/ISI, May 1998, August 1999, October 2000 13 * Modified by Hitoshi Asaeda, WIDE, August 2000 14 * Modified by Pavlin Radoslavov, ICSI, October 2002 15 * 16 * MROUTING Revision: 3.5 17 * and PIM-SMv2 and PIM-DM support, advanced API support, 18 * bandwidth metering and signaling 19 * |
20 * $FreeBSD: head/sys/netinet/ip_mroute.c 121446 2003-10-24 00:09:18Z sam $ | 20 * $FreeBSD: head/sys/netinet/ip_mroute.c 121700 2003-10-29 19:15:00Z sam $ |
21 */ 22 23#include "opt_mac.h" 24#include "opt_mrouting.h" 25#include "opt_random_ip_id.h" 26 27#ifdef PIM 28#define _PIM_VT 1 --- 627 unchanged lines hidden (view full) --- 656 /* 657 * Detach/disable hooks to the reset of the system. 658 */ 659 ip_mrouter = NULL; 660 mrt_api_config = 0; 661 662 VIF_LOCK(); 663 if (encap_cookie) { | 21 */ 22 23#include "opt_mac.h" 24#include "opt_mrouting.h" 25#include "opt_random_ip_id.h" 26 27#ifdef PIM 28#define _PIM_VT 1 --- 627 unchanged lines hidden (view full) --- 656 /* 657 * Detach/disable hooks to the reset of the system. 658 */ 659 ip_mrouter = NULL; 660 mrt_api_config = 0; 661 662 VIF_LOCK(); 663 if (encap_cookie) { |
664 encap_detach(encap_cookie); | 664 const struct encaptab *c = encap_cookie; |
665 encap_cookie = NULL; | 665 encap_cookie = NULL; |
666 encap_detach(c); |
|
666 } | 667 } |
668 VIF_UNLOCK(); 669 |
|
667 callout_stop(&tbf_reprocess_ch); 668 | 670 callout_stop(&tbf_reprocess_ch); 671 |
672 VIF_LOCK(); |
|
669 /* 670 * For each phyint in use, disable promiscuous reception of all IP 671 * multicasts. 672 */ 673 for (vifi = 0; vifi < numvifs; vifi++) { 674 if (viftable[vifi].v_lcl_addr.s_addr != 0 && 675 !(viftable[vifi].v_flags & (VIFF_TUNNEL | VIFF_REGISTER))) { 676 struct sockaddr_in *so = (struct sockaddr_in *)&(ifr.ifr_addr); --- 9 unchanged lines hidden (view full) --- 686 bzero((caddr_t)viftable, sizeof(viftable)); 687 numvifs = 0; 688 pim_assert = 0; 689 VIF_LOCK_DESTROY(); 690 691 /* 692 * Free all multicast forwarding cache entries. 693 */ | 673 /* 674 * For each phyint in use, disable promiscuous reception of all IP 675 * multicasts. 676 */ 677 for (vifi = 0; vifi < numvifs; vifi++) { 678 if (viftable[vifi].v_lcl_addr.s_addr != 0 && 679 !(viftable[vifi].v_flags & (VIFF_TUNNEL | VIFF_REGISTER))) { 680 struct sockaddr_in *so = (struct sockaddr_in *)&(ifr.ifr_addr); --- 9 unchanged lines hidden (view full) --- 690 bzero((caddr_t)viftable, sizeof(viftable)); 691 numvifs = 0; 692 pim_assert = 0; 693 VIF_LOCK_DESTROY(); 694 695 /* 696 * Free all multicast forwarding cache entries. 697 */ |
694 MFC_LOCK(); | |
695 callout_stop(&expire_upcalls_ch); 696 callout_stop(&bw_upcalls_ch); 697 callout_stop(&bw_meter_ch); 698 | 698 callout_stop(&expire_upcalls_ch); 699 callout_stop(&bw_upcalls_ch); 700 callout_stop(&bw_meter_ch); 701 |
702 MFC_LOCK(); |
|
699 for (i = 0; i < MFCTBLSIZ; i++) { 700 for (rt = mfctable[i]; rt != NULL; ) { 701 struct mfc *nr = rt->mfc_next; 702 703 for (rte = rt->mfc_stall; rte != NULL; ) { 704 struct rtdetq *n = rte->next; 705 706 m_freem(rte->m); --- 2702 unchanged lines hidden --- | 703 for (i = 0; i < MFCTBLSIZ; i++) { 704 for (rt = mfctable[i]; rt != NULL; ) { 705 struct mfc *nr = rt->mfc_next; 706 707 for (rte = rt->mfc_stall; rte != NULL; ) { 708 struct rtdetq *n = rte->next; 709 710 m_freem(rte->m); --- 2702 unchanged lines hidden --- |