ip6_fib.c (bba73071b6f71be0a101658d7c13866e30b264a6) | ip6_fib.c (b75cc8f90f07342467b3bd51dbc0054f185032c9) |
---|---|
1/* 2 * Linux INET6 implementation 3 * Forwarding Information Database 4 * 5 * Authors: 6 * Pedro Roque <roque@di.fc.ul.pt> 7 * 8 * This program is free software; you can redistribute it and/or --- 285 unchanged lines hidden (view full) --- 294} 295 296struct fib6_table *fib6_get_table(struct net *net, u32 id) 297{ 298 return net->ipv6.fib6_main_tbl; 299} 300 301struct dst_entry *fib6_rule_lookup(struct net *net, struct flowi6 *fl6, | 1/* 2 * Linux INET6 implementation 3 * Forwarding Information Database 4 * 5 * Authors: 6 * Pedro Roque <roque@di.fc.ul.pt> 7 * 8 * This program is free software; you can redistribute it and/or --- 285 unchanged lines hidden (view full) --- 294} 295 296struct fib6_table *fib6_get_table(struct net *net, u32 id) 297{ 298 return net->ipv6.fib6_main_tbl; 299} 300 301struct dst_entry *fib6_rule_lookup(struct net *net, struct flowi6 *fl6, |
302 const struct sk_buff *skb, |
|
302 int flags, pol_lookup_t lookup) 303{ 304 struct rt6_info *rt; 305 | 303 int flags, pol_lookup_t lookup) 304{ 305 struct rt6_info *rt; 306 |
306 rt = lookup(net, net->ipv6.fib6_main_tbl, fl6, flags); | 307 rt = lookup(net, net->ipv6.fib6_main_tbl, fl6, skb, flags); |
307 if (rt->dst.error == -EAGAIN) { 308 ip6_rt_put(rt); 309 rt = net->ipv6.ip6_null_entry; 310 dst_hold(&rt->dst); 311 } 312 313 return &rt->dst; 314} --- 1840 unchanged lines hidden (view full) --- 2155 kfree(net->ipv6.fib_table_hash); 2156 kfree(net->ipv6.rt6_stats); 2157 fib6_notifier_exit(net); 2158} 2159 2160static struct pernet_operations fib6_net_ops = { 2161 .init = fib6_net_init, 2162 .exit = fib6_net_exit, | 308 if (rt->dst.error == -EAGAIN) { 309 ip6_rt_put(rt); 310 rt = net->ipv6.ip6_null_entry; 311 dst_hold(&rt->dst); 312 } 313 314 return &rt->dst; 315} --- 1840 unchanged lines hidden (view full) --- 2156 kfree(net->ipv6.fib_table_hash); 2157 kfree(net->ipv6.rt6_stats); 2158 fib6_notifier_exit(net); 2159} 2160 2161static struct pernet_operations fib6_net_ops = { 2162 .init = fib6_net_init, 2163 .exit = fib6_net_exit, |
2164 .async = true, |
|
2163}; 2164 2165int __init fib6_init(void) 2166{ 2167 int ret = -ENOMEM; 2168 2169 fib6_node_kmem = kmem_cache_create("fib6_nodes", 2170 sizeof(struct fib6_node), --- 220 unchanged lines hidden --- | 2165}; 2166 2167int __init fib6_init(void) 2168{ 2169 int ret = -ENOMEM; 2170 2171 fib6_node_kmem = kmem_cache_create("fib6_nodes", 2172 sizeof(struct fib6_node), --- 220 unchanged lines hidden --- |