This is a note to let you know that I've just added the patch titled ipv6: don't stop backtracking in fib6_lookup_1 if subtree does not match to the 3.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ipv6-don-t-stop-backtracking-in-fib6_lookup_1-if-subtree-does-not-match.patch and it can be found in the queue-3.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 2d8153827908cca60567ab7dd7abe92affca8823 Mon Sep 17 00:00:00 2001 From: Hannes Frederic Sowa <hannes@xxxxxxxxxxxxxxxxxxx> Date: Wed, 7 Aug 2013 02:34:31 +0200 Subject: ipv6: don't stop backtracking in fib6_lookup_1 if subtree does not match From: Hannes Frederic Sowa <hannes@xxxxxxxxxxxxxxxxxxx> [ Upstream commit 3e3be275851bc6fc90bfdcd732cd95563acd982b ] In case a subtree did not match we currently stop backtracking and return NULL (root table from fib_lookup). This could yield in invalid routing table lookups when using subtrees. Instead continue to backtrack until a valid subtree or node is found and return this match. Also remove unneeded NULL check. Reported-by: Teco Boot <teco@xxxxxxxxxx> Cc: YOSHIFUJI Hideaki <yoshfuji@xxxxxxxxxxxxxx> Cc: David Lamparter <equinox@xxxxxxxxxx> Cc: <boutier@xxxxxxxxxxxxxxxxxxxxxxxxx> Signed-off-by: Hannes Frederic Sowa <hannes@xxxxxxxxxxxxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- net/ipv6/ip6_fib.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -949,14 +949,22 @@ static struct fib6_node * fib6_lookup_1( if (ipv6_prefix_equal(&key->addr, args->addr, key->plen)) { #ifdef CONFIG_IPV6_SUBTREES - if (fn->subtree) - fn = fib6_lookup_1(fn->subtree, args + 1); + if (fn->subtree) { + struct fib6_node *sfn; + sfn = fib6_lookup_1(fn->subtree, + args + 1); + if (!sfn) + goto backtrack; + fn = sfn; + } #endif - if (!fn || fn->fn_flags & RTN_RTINFO) + if (fn->fn_flags & RTN_RTINFO) return fn; } } - +#ifdef CONFIG_IPV6_SUBTREES +backtrack: +#endif if (fn->fn_flags & RTN_ROOT) break; Patches currently in stable-queue which might be from hannes@xxxxxxxxxxxxxxxxxxx are queue-3.4/net-bridge-convert-mldv2-query-mrc-into-msecs_to_jiffies-for-max_delay.patch queue-3.4/ipv6-don-t-stop-backtracking-in-fib6_lookup_1-if-subtree-does-not-match.patch queue-3.4/ipv6-don-t-depend-on-per-socket-memory-for-neighbour-discovery-messages.patch queue-3.4/ipv6-remove-max_addresses-check-from-ipv6_create_tempaddr.patch queue-3.4/icmpv6-treat-dest-unreachable-codes-5-and-6-as-eacces-not-eproto.patch queue-3.4/ipv6-drop-packets-with-multiple-fragmentation-headers.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html