Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 313927
b: refs/heads/master
c: 8e77327
h: refs/heads/master
i:
  313925: 5048147
  313923: d34035d
  313919: b2aabe5
v: v3
  • Loading branch information
David S. Miller committed Jun 11, 2012
1 parent 9704779 commit a812a01
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b48c80ece973e9eddb042f6685b482b261ff0d47
refs/heads/master: 8e77327783c753689a1a766ab9d301b81c2529f1
1 change: 1 addition & 0 deletions trunk/include/net/ip6_fib.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ struct fib6_table {
u32 tb6_id;
rwlock_t tb6_lock;
struct fib6_node tb6_root;
struct inet_peer_base tb6_peers;
};

#define RT6_TABLE_UNSPEC RT_TABLE_UNSPEC
Expand Down
12 changes: 7 additions & 5 deletions trunk/include/net/ip_fib.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <net/flow.h>
#include <linux/seq_file.h>
#include <net/fib_rules.h>
#include <net/inetpeer.h>

struct fib_config {
u8 fc_dst_len;
Expand Down Expand Up @@ -157,11 +158,12 @@ extern __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh);
FIB_RES_SADDR(net, res))

struct fib_table {
struct hlist_node tb_hlist;
u32 tb_id;
int tb_default;
int tb_num_default;
unsigned long tb_data[0];
struct hlist_node tb_hlist;
u32 tb_id;
int tb_default;
int tb_num_default;
struct inet_peer_base tb_peers;
unsigned long tb_data[0];
};

extern int fib_table_lookup(struct fib_table *tb, const struct flowi4 *flp,
Expand Down
3 changes: 3 additions & 0 deletions trunk/net/ipv4/fib_trie.c
Original file line number Diff line number Diff line change
Expand Up @@ -1843,6 +1843,8 @@ int fib_table_flush(struct fib_table *tb)
if (ll && hlist_empty(&ll->list))
trie_leaf_remove(t, ll);

inetpeer_invalidate_tree(&tb->tb_peers);

pr_debug("trie_flush found=%d\n", found);
return found;
}
Expand Down Expand Up @@ -1991,6 +1993,7 @@ struct fib_table *fib_trie_table(u32 id)
tb->tb_id = id;
tb->tb_default = -1;
tb->tb_num_default = 0;
inet_peer_base_init(&tb->tb_peers);

t = (struct trie *) tb->tb_data;
memset(t, 0, sizeof(*t));
Expand Down
5 changes: 5 additions & 0 deletions trunk/net/ipv6/ip6_fib.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ static struct fib6_table *fib6_alloc_table(struct net *net, u32 id)
table->tb6_id = id;
table->tb6_root.leaf = net->ipv6.ip6_null_entry;
table->tb6_root.fn_flags = RTN_ROOT | RTN_TL_ROOT | RTN_RTINFO;
inet_peer_base_init(&table->tb6_peers);
}

return table;
Expand Down Expand Up @@ -1633,6 +1634,7 @@ static int __net_init fib6_net_init(struct net *net)
net->ipv6.fib6_main_tbl->tb6_root.leaf = net->ipv6.ip6_null_entry;
net->ipv6.fib6_main_tbl->tb6_root.fn_flags =
RTN_ROOT | RTN_TL_ROOT | RTN_RTINFO;
inet_peer_base_init(&net->ipv6.fib6_main_tbl->tb6_peers);

#ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.fib6_local_tbl = kzalloc(sizeof(*net->ipv6.fib6_local_tbl),
Expand All @@ -1643,6 +1645,7 @@ static int __net_init fib6_net_init(struct net *net)
net->ipv6.fib6_local_tbl->tb6_root.leaf = net->ipv6.ip6_null_entry;
net->ipv6.fib6_local_tbl->tb6_root.fn_flags =
RTN_ROOT | RTN_TL_ROOT | RTN_RTINFO;
inet_peer_base_init(&net->ipv6.fib6_local_tbl->tb6_peers);
#endif
fib6_tables_init(net);

Expand All @@ -1666,8 +1669,10 @@ static void fib6_net_exit(struct net *net)
del_timer_sync(&net->ipv6.ip6_fib_timer);

#ifdef CONFIG_IPV6_MULTIPLE_TABLES
inetpeer_invalidate_tree(&net->ipv6.fib6_local_tbl->tb6_peers);
kfree(net->ipv6.fib6_local_tbl);
#endif
inetpeer_invalidate_tree(&net->ipv6.fib6_main_tbl->tb6_peers);
kfree(net->ipv6.fib6_main_tbl);
kfree(net->ipv6.fib_table_hash);
kfree(net->ipv6.rt6_stats);
Expand Down

0 comments on commit a812a01

Please sign in to comment.