diff options
author | David S. Miller <davem@davemloft.net> | 2012-06-11 03:01:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-11 05:09:16 -0400 |
commit | 8e77327783c753689a1a766ab9d301b81c2529f1 (patch) | |
tree | 5b178d092f57519d809c6ba69b14c36c1c5f8ff0 /net/ipv6/ip6_fib.c | |
parent | b48c80ece973e9eddb042f6685b482b261ff0d47 (diff) |
inet: Add inetpeer tree roots to the FIB tables.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_fib.c')
-rw-r--r-- | net/ipv6/ip6_fib.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 0c220a416626..7ef0743f06f0 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c | |||
@@ -197,6 +197,7 @@ static struct fib6_table *fib6_alloc_table(struct net *net, u32 id) | |||
197 | table->tb6_id = id; | 197 | table->tb6_id = id; |
198 | table->tb6_root.leaf = net->ipv6.ip6_null_entry; | 198 | table->tb6_root.leaf = net->ipv6.ip6_null_entry; |
199 | table->tb6_root.fn_flags = RTN_ROOT | RTN_TL_ROOT | RTN_RTINFO; | 199 | table->tb6_root.fn_flags = RTN_ROOT | RTN_TL_ROOT | RTN_RTINFO; |
200 | inet_peer_base_init(&table->tb6_peers); | ||
200 | } | 201 | } |
201 | 202 | ||
202 | return table; | 203 | return table; |
@@ -1633,6 +1634,7 @@ static int __net_init fib6_net_init(struct net *net) | |||
1633 | net->ipv6.fib6_main_tbl->tb6_root.leaf = net->ipv6.ip6_null_entry; | 1634 | net->ipv6.fib6_main_tbl->tb6_root.leaf = net->ipv6.ip6_null_entry; |
1634 | net->ipv6.fib6_main_tbl->tb6_root.fn_flags = | 1635 | net->ipv6.fib6_main_tbl->tb6_root.fn_flags = |
1635 | RTN_ROOT | RTN_TL_ROOT | RTN_RTINFO; | 1636 | RTN_ROOT | RTN_TL_ROOT | RTN_RTINFO; |
1637 | inet_peer_base_init(&net->ipv6.fib6_main_tbl->tb6_peers); | ||
1636 | 1638 | ||
1637 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES | 1639 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES |
1638 | net->ipv6.fib6_local_tbl = kzalloc(sizeof(*net->ipv6.fib6_local_tbl), | 1640 | net->ipv6.fib6_local_tbl = kzalloc(sizeof(*net->ipv6.fib6_local_tbl), |
@@ -1643,6 +1645,7 @@ static int __net_init fib6_net_init(struct net *net) | |||
1643 | net->ipv6.fib6_local_tbl->tb6_root.leaf = net->ipv6.ip6_null_entry; | 1645 | net->ipv6.fib6_local_tbl->tb6_root.leaf = net->ipv6.ip6_null_entry; |
1644 | net->ipv6.fib6_local_tbl->tb6_root.fn_flags = | 1646 | net->ipv6.fib6_local_tbl->tb6_root.fn_flags = |
1645 | RTN_ROOT | RTN_TL_ROOT | RTN_RTINFO; | 1647 | RTN_ROOT | RTN_TL_ROOT | RTN_RTINFO; |
1648 | inet_peer_base_init(&net->ipv6.fib6_local_tbl->tb6_peers); | ||
1646 | #endif | 1649 | #endif |
1647 | fib6_tables_init(net); | 1650 | fib6_tables_init(net); |
1648 | 1651 | ||
@@ -1666,8 +1669,10 @@ static void fib6_net_exit(struct net *net) | |||
1666 | del_timer_sync(&net->ipv6.ip6_fib_timer); | 1669 | del_timer_sync(&net->ipv6.ip6_fib_timer); |
1667 | 1670 | ||
1668 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES | 1671 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES |
1672 | inetpeer_invalidate_tree(&net->ipv6.fib6_local_tbl->tb6_peers); | ||
1669 | kfree(net->ipv6.fib6_local_tbl); | 1673 | kfree(net->ipv6.fib6_local_tbl); |
1670 | #endif | 1674 | #endif |
1675 | inetpeer_invalidate_tree(&net->ipv6.fib6_main_tbl->tb6_peers); | ||
1671 | kfree(net->ipv6.fib6_main_tbl); | 1676 | kfree(net->ipv6.fib6_main_tbl); |
1672 | kfree(net->ipv6.fib_table_hash); | 1677 | kfree(net->ipv6.fib_table_hash); |
1673 | kfree(net->ipv6.rt6_stats); | 1678 | kfree(net->ipv6.rt6_stats); |