Selaa lähdekoodia

[IPV6]: Make fib6_node subtree depend on IPV6_SUBTREES

Make fib6_node 'subtree' depend on IPV6_SUBTREES.

Signed-off-by: Kim Nordlund <kim.nordlund@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Kim Nordlund 18 vuotta sitten
vanhempi
commit
8bce65b95a
2 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 2 2
      include/net/ip6_fib.h
  2. 1 1
      net/ipv6/route.c

+ 2 - 2
include/net/ip6_fib.h

@@ -50,9 +50,9 @@ struct fib6_node
 	struct fib6_node	*parent;
 	struct fib6_node	*parent;
 	struct fib6_node	*left;
 	struct fib6_node	*left;
 	struct fib6_node	*right;
 	struct fib6_node	*right;
-
+#ifdef CONFIG_IPV6_SUBTREES
 	struct fib6_node	*subtree;
 	struct fib6_node	*subtree;
-
+#endif
 	struct rt6_info		*leaf;
 	struct rt6_info		*leaf;
 
 
 	__u16			fn_bit;		/* bit key */
 	__u16			fn_bit;		/* bit key */

+ 1 - 1
net/ipv6/route.c

@@ -494,7 +494,7 @@ do { \
 				goto out; \
 				goto out; \
 			pn = fn->parent; \
 			pn = fn->parent; \
 			if (FIB6_SUBTREE(pn) && FIB6_SUBTREE(pn) != fn) \
 			if (FIB6_SUBTREE(pn) && FIB6_SUBTREE(pn) != fn) \
-				fn = fib6_lookup(pn->subtree, NULL, saddr); \
+				fn = fib6_lookup(FIB6_SUBTREE(pn), NULL, saddr); \
 			else \
 			else \
 				fn = pn; \
 				fn = pn; \
 			if (fn->fn_flags & RTN_RTINFO) \
 			if (fn->fn_flags & RTN_RTINFO) \