Skip to contentSkip to conversation

IPv4: unresolved multicast route cleanup

PATCH In review Andreas Meissner 2 participants 2 messages May 10, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IPv4: unresolved multicast route cleanup

from: Andreas Meissner <[email protected]>

Fixes the expiration timer for unresolved multicast route entries. In case new multicast routing requests come in faster than the expiration timeout occurs (e.g. zap through multicast TV streams), the timer is prevented from being called at time for already existing entries.

Signed-off by: Andreas Meissner <[email protected]>
---
As the single timer is resetted to default whenever a new entry is made, the timeout for existing unresolved entires are missed and/or not updated. As a consequence new requests are denied when the limit of unresolved entries has been reached because old entries live longer than they are supposed to.
The solution is to reset the timer only for the first unresolved entry in the multicast routing cache. All other timers are already set and updated correctly within the timer function itself by now.

---
 ipv4/ipmr.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
ipv4/ipmr.c renamed from ipv4/ipmr.c.orig +2 -1
@@ -753,7 +753,8 @@
 		c->next = mfc_unres_queue;
 		mfc_unres_queue = c;
 
-		mod_timer(&ipmr_expire_timer, c->mfc_un.unres.expires);
+		if (atomic_read(&net->ipv4.cache_resolve_queue_len) == 1)
+			mod_timer(&ipmr_expire_timer, c->mfc_un.unres.expires);
 	}
 
 	/*
maintainer
#1 lore raw

From: Andreas Meissner <[email protected]>
Date: Mon, 10 May 2010 11:09:33 +0200

Quoted 7 lines

from: Andreas Meissner <[email protected]>

Fixes the expiration timer for unresolved multicast route entries. In case new multicast routing requests come in faster than the expiration timeout occurs (e.g. zap through multicast TV streams), the timer is prevented from being called at time for already existing entries.

Quoted 10 lines

Signed-off by: Andreas Meissner <[email protected]>
---
As the single timer is resetted to default whenever a new entry is made, the timeout for existing unresolved entires are missed and/or not updated. As a consequence new requests are denied when the limit of unresolved entries has been reached because old entries live longer than they are supposed to.
The solution is to reset the timer only for the first unresolved entry in the multicast routing cache. All other timers are already set and updated correctly within the timer function itself by now.

Looks great, applied thanks!