ipv4: ipmr: fix invalid cache resolving when adding a non-matching entry
authorPatrick McHardy <kaber@trash.net>
Thu, 15 Apr 2010 11:29:28 +0000 (13:29 +0200)
committerPatrick McHardy <kaber@trash.net>
Thu, 15 Apr 2010 11:31:29 +0000 (13:31 +0200)
commitb0ebb739a8f68039f03e80b3476b204fe5adf0d7
tree45921e2969657f6a35fbac751218ea78e1f3be9b
parent66496d4973dcb848d163805fa6b485850b7555e3
ipv4: ipmr: fix invalid cache resolving when adding a non-matching entry

The patch to convert struct mfc_cache to list_heads (ipv4: ipmr: convert
struct mfc_cache to struct list_head) introduced a bug when adding new
cache entries that don't match any unresolved entries.

The unres queue is searched for a matching entry, which is then resolved.
When no matching entry is present, the iterator points to the head of the
list, but is treated as a matching entry. Use a seperate variable to
indicate that a matching entry was found.

Signed-off-by: Patrick McHardy <kaber@trash.net>
net/ipv4/ipmr.c