--- zzzz-none-000/linux-2.4.17/net/ipv4/ipmr.c 2001-12-21 17:42:05.000000000 +0000 +++ sangam-fb-322/linux-2.4.17/net/ipv4/ipmr.c 2004-11-24 13:22:08.000000000 +0000 @@ -9,7 +9,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * - * Version: $Id: ipmr.c,v 1.65 2001/10/31 21:55:54 davem Exp $ + * Version: $Id: ipmr.c,v 1.1.1.1.6.1 2003/09/04 14:07:43 pkapoor Exp $ * * Fixes: * Michael Chastain : Incorrect size of copying. @@ -450,6 +450,19 @@ return 0; } +/************************************************************************** + * FUNCTION NAME : ipmr_cache_find + ************************************************************************** + * DESCRIPTION : + * The function finds a matching MR CACHE entry for a packet with a + * specified multicast group address. The previous implementation was + * changed to no longer match the source of the packet. + * + * RETURNS : + * NULL - No match. + * Non NULL - Succesfull Match. + ***************************************************************************/ +#if 0 static struct mfc_cache *ipmr_cache_find(__u32 origin, __u32 mcastgrp) { int line=MFC_HASH(mcastgrp,origin); @@ -461,6 +474,23 @@ } return c; } +#else +static struct mfc_cache *ipmr_cache_find(__u32 origin, __u32 mcastgrp) +{ + struct mfc_cache *c; + int line; + + /* Create a hash line for the multicast group. The source IP address + * is a DONT Care i.e. 0.0.0.0 */ + line = MFC_HASH(mcastgrp,0); + + for (c=mfc_cache_array[line]; c; c = c->next) { + if (c->mfc_mcastgrp==mcastgrp) + break; + } + return c; +} +#endif /* * Allocate a multicast cache entry @@ -683,7 +713,13 @@ int line; struct mfc_cache *c, **cp; + /* Create a hash line for the multicast group. The source IP address + * is a DONT Care i.e. 0.0.0.0 */ +#if 0 line=MFC_HASH(mfc->mfcc_mcastgrp.s_addr, mfc->mfcc_origin.s_addr); +#else + line=MFC_HASH(mfc->mfcc_mcastgrp.s_addr, 0); +#endif for (cp=&mfc_cache_array[line]; (c=*cp) != NULL; cp = &c->next) { if (c->mfc_origin == mfc->mfcc_origin.s_addr && @@ -704,7 +740,13 @@ int line; struct mfc_cache *uc, *c, **cp; + /* Create a hash line for the multicast group. The source IP address + * is a DONT Care i.e. 0.0.0.0 */ +#if 0 line=MFC_HASH(mfc->mfcc_mcastgrp.s_addr, mfc->mfcc_origin.s_addr); +#else + line=MFC_HASH(mfc->mfcc_mcastgrp.s_addr, 0); +#endif for (cp=&mfc_cache_array[line]; (c=*cp) != NULL; cp = &c->next) { if (c->mfc_origin == mfc->mfcc_origin.s_addr &&