Lines Matching refs:ipv6
153 atomic_dec(&net->ipv6.rt6_stats->fib_rt_uncache); in rt6_uncached_list_del()
356 struct rt6_info *rt = dst_alloc(&net->ipv6.ip6_dst_ops, dev, in ip6_dst_alloc()
361 atomic_inc(&net->ipv6.rt6_stats->fib_rt_alloc); in ip6_dst_alloc()
578 res->f6i = net->ipv6.fib6_null_entry; in rt6_device_match()
592 res->f6i = net->ipv6.fib6_null_entry; in rt6_device_match()
886 if (!leaf || leaf == net->ipv6.fib6_null_entry) in rt6_select()
925 res->f6i = net->ipv6.fib6_null_entry; in rt6_select()
1178 rt = net->ipv6.ip6_null_entry; in ip6_hold_safe()
1209 nrt = dev_net(dev)->ipv6.ip6_null_entry; in ip6_create_rt_rcu()
1232 res.f6i = net->ipv6.fib6_null_entry; in ip6_pol_route_lookup()
1237 if (res.f6i == net->ipv6.fib6_null_entry) { in ip6_pol_route_lookup()
1242 rt = net->ipv6.ip6_null_entry; in ip6_pol_route_lookup()
1467 net->ipv6.rt6_stats->fib_rt_cache--; in rt6_remove_exception()
1720 net->ipv6.rt6_stats->fib_rt_cache++; in rt6_insert_exception()
2194 if (res->f6i == net->ipv6.fib6_null_entry) { in fib6_table_lookup()
2224 if (net->ipv6.devconf_all->forwarding == 0) in ip6_pol_route()
2230 if (res.f6i == net->ipv6.fib6_null_entry) in ip6_pol_route()
2255 atomic_inc(&net->ipv6.rt6_stats->fib_rt_uncache); in ip6_pol_route()
2272 rt = net->ipv6.ip6_null_entry; in ip6_pol_route()
2527 dst = &net->ipv6.ip6_null_entry->dst; in ip6_route_output_flags()
2546 atomic_inc(&net->ipv6.rt6_stats->fib_rt_alloc); in ip6_blackhole_route()
2713 rt6_update_expires(rt, net->ipv6.sysctl.ip6_rt_mtu_expires); in rt6_do_update_pmtu()
2980 rt = net->ipv6.fib6_null_entry; in __ip6_route_redirect()
2982 ret = net->ipv6.ip6_null_entry; in __ip6_route_redirect()
2986 if (rt == net->ipv6.fib6_null_entry) { in __ip6_route_redirect()
3078 if (mtu < net->ipv6.sysctl.ip6_rt_min_advmss) in ip6_default_advmss()
3079 mtu = net->ipv6.sysctl.ip6_rt_min_advmss; in ip6_default_advmss()
3186 atomic_inc(&net->ipv6.rt6_stats->fib_rt_uncache); in icmp6_dst_alloc()
3196 struct net *net = container_of(ops, struct net, ipv6.ip6_dst_ops); in ip6_dst_gc()
3197 int rt_min_interval = net->ipv6.sysctl.ip6_rt_gc_min_interval; in ip6_dst_gc()
3198 int rt_max_size = net->ipv6.sysctl.ip6_rt_max_size; in ip6_dst_gc()
3199 int rt_elasticity = net->ipv6.sysctl.ip6_rt_gc_elasticity; in ip6_dst_gc()
3200 int rt_gc_timeout = net->ipv6.sysctl.ip6_rt_gc_timeout; in ip6_dst_gc()
3201 unsigned long rt_last_gc = net->ipv6.ip6_rt_last_gc; in ip6_dst_gc()
3212 net->ipv6.ip6_rt_gc_expire++; in ip6_dst_gc()
3213 fib6_run_gc(net->ipv6.ip6_rt_gc_expire, net, true); in ip6_dst_gc()
3216 net->ipv6.ip6_rt_gc_expire = rt_gc_timeout>>1; in ip6_dst_gc()
3218 net->ipv6.ip6_rt_gc_expire -= net->ipv6.ip6_rt_gc_expire>>rt_elasticity; in ip6_dst_gc()
3244 if (!err && res->f6i != net->ipv6.fib6_null_entry) in ip6_nh_lookup_table()
3757 if (rt == net->ipv6.fib6_null_entry) { in __ip6_del_rt()
3790 if (rt == net->ipv6.fib6_null_entry) in __ip6_del_rt_siblings()
4316 head = &net->ipv6.fib_table_hash[h]; in rt6_purge_dflt_routers()
4485 rt != net->ipv6.fib6_null_entry && in fib6_remove_prefsrc()
4644 if (rt != net->ipv6.fib6_null_entry && !rt->nh && in fib6_ifup()
4730 if (rt == net->ipv6.fib6_null_entry || rt->nh) in fib6_ifdown()
4777 if (net->ipv6.sysctl.skip_notify_on_dev_down) in rt6_sync_down_dev()
5734 if (rt == net->ipv6.fib6_null_entry) in rt6_dump_route()
5961 if (rt == net->ipv6.ip6_null_entry) { in inet6_rtm_getroute()
6077 net->ipv6.fib6_null_entry->fib6_nh->fib_nh_dev = dev; in ip6_route_dev_notify()
6078 net->ipv6.ip6_null_entry->dst.dev = dev; in ip6_route_dev_notify()
6079 net->ipv6.ip6_null_entry->rt6i_idev = in6_dev_get(dev); in ip6_route_dev_notify()
6081 net->ipv6.ip6_prohibit_entry->dst.dev = dev; in ip6_route_dev_notify()
6082 net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev); in ip6_route_dev_notify()
6083 net->ipv6.ip6_blk_hole_entry->dst.dev = dev; in ip6_route_dev_notify()
6084 net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); in ip6_route_dev_notify()
6091 in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev); in ip6_route_dev_notify()
6093 in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev); in ip6_route_dev_notify()
6094 in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev); in ip6_route_dev_notify()
6110 net->ipv6.rt6_stats->fib_nodes, in rt6_stats_seq_show()
6111 net->ipv6.rt6_stats->fib_route_nodes, in rt6_stats_seq_show()
6112 atomic_read(&net->ipv6.rt6_stats->fib_rt_alloc), in rt6_stats_seq_show()
6113 net->ipv6.rt6_stats->fib_rt_entries, in rt6_stats_seq_show()
6114 net->ipv6.rt6_stats->fib_rt_cache, in rt6_stats_seq_show()
6115 dst_entries_get_slow(&net->ipv6.ip6_dst_ops), in rt6_stats_seq_show()
6116 net->ipv6.rt6_stats->fib_discarded_routes); in rt6_stats_seq_show()
6134 delay = net->ipv6.sysctl.flush_delay; in ipv6_sysctl_rtcache_flush()
6146 .data = &init_net.ipv6.sysctl.flush_delay,
6160 .data = &init_net.ipv6.sysctl.ip6_rt_max_size,
6167 .data = &init_net.ipv6.sysctl.ip6_rt_gc_min_interval,
6174 .data = &init_net.ipv6.sysctl.ip6_rt_gc_timeout,
6181 .data = &init_net.ipv6.sysctl.ip6_rt_gc_interval,
6188 .data = &init_net.ipv6.sysctl.ip6_rt_gc_elasticity,
6195 .data = &init_net.ipv6.sysctl.ip6_rt_mtu_expires,
6202 .data = &init_net.ipv6.sysctl.ip6_rt_min_advmss,
6209 .data = &init_net.ipv6.sysctl.ip6_rt_gc_min_interval,
6216 .data = &init_net.ipv6.sysctl.skip_notify_on_dev_down,
6235 table[0].data = &net->ipv6.sysctl.flush_delay; in ipv6_route_sysctl_init()
6237 table[1].data = &net->ipv6.ip6_dst_ops.gc_thresh; in ipv6_route_sysctl_init()
6238 table[2].data = &net->ipv6.sysctl.ip6_rt_max_size; in ipv6_route_sysctl_init()
6239 table[3].data = &net->ipv6.sysctl.ip6_rt_gc_min_interval; in ipv6_route_sysctl_init()
6240 table[4].data = &net->ipv6.sysctl.ip6_rt_gc_timeout; in ipv6_route_sysctl_init()
6241 table[5].data = &net->ipv6.sysctl.ip6_rt_gc_interval; in ipv6_route_sysctl_init()
6242 table[6].data = &net->ipv6.sysctl.ip6_rt_gc_elasticity; in ipv6_route_sysctl_init()
6243 table[7].data = &net->ipv6.sysctl.ip6_rt_mtu_expires; in ipv6_route_sysctl_init()
6244 table[8].data = &net->ipv6.sysctl.ip6_rt_min_advmss; in ipv6_route_sysctl_init()
6245 table[9].data = &net->ipv6.sysctl.ip6_rt_gc_min_interval; in ipv6_route_sysctl_init()
6246 table[10].data = &net->ipv6.sysctl.skip_notify_on_dev_down; in ipv6_route_sysctl_init()
6261 memcpy(&net->ipv6.ip6_dst_ops, &ip6_dst_ops_template, in ip6_route_net_init()
6262 sizeof(net->ipv6.ip6_dst_ops)); in ip6_route_net_init()
6264 if (dst_entries_init(&net->ipv6.ip6_dst_ops) < 0) in ip6_route_net_init()
6267 net->ipv6.fib6_null_entry = fib6_info_alloc(GFP_KERNEL, true); in ip6_route_net_init()
6268 if (!net->ipv6.fib6_null_entry) in ip6_route_net_init()
6270 memcpy(net->ipv6.fib6_null_entry, &fib6_null_entry_template, in ip6_route_net_init()
6271 sizeof(*net->ipv6.fib6_null_entry)); in ip6_route_net_init()
6273 net->ipv6.ip6_null_entry = kmemdup(&ip6_null_entry_template, in ip6_route_net_init()
6274 sizeof(*net->ipv6.ip6_null_entry), in ip6_route_net_init()
6276 if (!net->ipv6.ip6_null_entry) in ip6_route_net_init()
6278 net->ipv6.ip6_null_entry->dst.ops = &net->ipv6.ip6_dst_ops; in ip6_route_net_init()
6279 dst_init_metrics(&net->ipv6.ip6_null_entry->dst, in ip6_route_net_init()
6281 INIT_LIST_HEAD(&net->ipv6.ip6_null_entry->rt6i_uncached); in ip6_route_net_init()
6284 net->ipv6.fib6_has_custom_rules = false; in ip6_route_net_init()
6285 net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template, in ip6_route_net_init()
6286 sizeof(*net->ipv6.ip6_prohibit_entry), in ip6_route_net_init()
6288 if (!net->ipv6.ip6_prohibit_entry) in ip6_route_net_init()
6290 net->ipv6.ip6_prohibit_entry->dst.ops = &net->ipv6.ip6_dst_ops; in ip6_route_net_init()
6291 dst_init_metrics(&net->ipv6.ip6_prohibit_entry->dst, in ip6_route_net_init()
6293 INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->rt6i_uncached); in ip6_route_net_init()
6295 net->ipv6.ip6_blk_hole_entry = kmemdup(&ip6_blk_hole_entry_template, in ip6_route_net_init()
6296 sizeof(*net->ipv6.ip6_blk_hole_entry), in ip6_route_net_init()
6298 if (!net->ipv6.ip6_blk_hole_entry) in ip6_route_net_init()
6300 net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops; in ip6_route_net_init()
6301 dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst, in ip6_route_net_init()
6303 INIT_LIST_HEAD(&net->ipv6.ip6_blk_hole_entry->rt6i_uncached); in ip6_route_net_init()
6305 net->ipv6.fib6_routes_require_src = 0; in ip6_route_net_init()
6309 net->ipv6.sysctl.flush_delay = 0; in ip6_route_net_init()
6310 net->ipv6.sysctl.ip6_rt_max_size = 4096; in ip6_route_net_init()
6311 net->ipv6.sysctl.ip6_rt_gc_min_interval = HZ / 2; in ip6_route_net_init()
6312 net->ipv6.sysctl.ip6_rt_gc_timeout = 60*HZ; in ip6_route_net_init()
6313 net->ipv6.sysctl.ip6_rt_gc_interval = 30*HZ; in ip6_route_net_init()
6314 net->ipv6.sysctl.ip6_rt_gc_elasticity = 9; in ip6_route_net_init()
6315 net->ipv6.sysctl.ip6_rt_mtu_expires = 10*60*HZ; in ip6_route_net_init()
6316 net->ipv6.sysctl.ip6_rt_min_advmss = IPV6_MIN_MTU - 20 - 40; in ip6_route_net_init()
6317 net->ipv6.sysctl.skip_notify_on_dev_down = 0; in ip6_route_net_init()
6319 net->ipv6.ip6_rt_gc_expire = 30*HZ; in ip6_route_net_init()
6327 kfree(net->ipv6.ip6_prohibit_entry); in ip6_route_net_init()
6329 kfree(net->ipv6.ip6_null_entry); in ip6_route_net_init()
6332 kfree(net->ipv6.fib6_null_entry); in ip6_route_net_init()
6334 dst_entries_destroy(&net->ipv6.ip6_dst_ops); in ip6_route_net_init()
6341 kfree(net->ipv6.fib6_null_entry); in ip6_route_net_exit()
6342 kfree(net->ipv6.ip6_null_entry); in ip6_route_net_exit()
6344 kfree(net->ipv6.ip6_prohibit_entry); in ip6_route_net_exit()
6345 kfree(net->ipv6.ip6_blk_hole_entry); in ip6_route_net_exit()
6347 dst_entries_destroy(&net->ipv6.ip6_dst_ops); in ip6_route_net_exit()
6381 net->ipv6.peers = bp; in ipv6_inetpeer_init()
6387 struct inet_peer_base *bp = net->ipv6.peers; in ipv6_inetpeer_exit()
6389 net->ipv6.peers = NULL; in ipv6_inetpeer_exit()
6414 init_net.ipv6.fib6_null_entry->fib6_nh->fib_nh_dev = init_net.loopback_dev; in ip6_route_init_special_entries()
6415 init_net.ipv6.ip6_null_entry->dst.dev = init_net.loopback_dev; in ip6_route_init_special_entries()
6416 init_net.ipv6.ip6_null_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); in ip6_route_init_special_entries()
6418 init_net.ipv6.ip6_prohibit_entry->dst.dev = init_net.loopback_dev; in ip6_route_init_special_entries()
6419 init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); in ip6_route_init_special_entries()
6420 init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; in ip6_route_init_special_entries()
6421 init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); in ip6_route_init_special_entries()