From 7775111bc0408d69aae0a8cf067451fc9b879c9f Mon Sep 17 00:00:00 2001 From: Simon Arlott Date: Sun, 24 Dec 2006 13:36:37 +0000 Subject: mroute: Use route cache origin of 0.0.0.0 to override all other entries for each group. --- net/ipv4/ipmr.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index ecb5422..bd5b554 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c @@ -465,8 +465,14 @@ static int vif_add(struct vifctl *vifc, int mrtsock) static struct mfc_cache *ipmr_cache_find(__be32 origin, __be32 mcastgrp) { int line=MFC_HASH(mcastgrp,origin); + int any=MFC_HASH(mcastgrp,0); struct mfc_cache *c; + for (c=mfc_cache_array[any]; c; c = c->next) { + if (c->mfc_origin==0 && c->mfc_mcastgrp==mcastgrp) + break; + } + if (c) return c; for (c=mfc_cache_array[line]; c; c = c->next) { if (c->mfc_origin==origin && c->mfc_mcastgrp==mcastgrp) break; -- 1.5.0.1