Lines Matching refs:ipv6
151 atomic_dec(&net->ipv6.rt6_stats->fib_rt_uncache); in rt6_uncached_list_del()
353 struct rt6_info *rt = dst_alloc(&net->ipv6.ip6_dst_ops, dev, in ip6_dst_alloc()
358 atomic_inc(&net->ipv6.rt6_stats->fib_rt_alloc); in ip6_dst_alloc()
572 res->f6i = net->ipv6.fib6_null_entry; in rt6_device_match()
586 res->f6i = net->ipv6.fib6_null_entry; in rt6_device_match()
880 if (!leaf || leaf == net->ipv6.fib6_null_entry) in rt6_select()
919 res->f6i = net->ipv6.fib6_null_entry; in rt6_select()
1174 rt = net->ipv6.ip6_null_entry; in ip6_hold_safe()
1205 nrt = dev_net(dev)->ipv6.ip6_null_entry; in ip6_create_rt_rcu()
1228 res.f6i = net->ipv6.fib6_null_entry; in ip6_pol_route_lookup()
1233 if (res.f6i == net->ipv6.fib6_null_entry) { in ip6_pol_route_lookup()
1238 rt = net->ipv6.ip6_null_entry; in ip6_pol_route_lookup()
1442 net->ipv6.rt6_stats->fib_rt_cache--; in rt6_remove_exception()
1695 net->ipv6.rt6_stats->fib_rt_cache++; in rt6_insert_exception()
2169 if (res->f6i == net->ipv6.fib6_null_entry) { in fib6_table_lookup()
2199 if (net->ipv6.devconf_all->forwarding == 0) in ip6_pol_route()
2205 if (res.f6i == net->ipv6.fib6_null_entry) in ip6_pol_route()
2230 atomic_inc(&net->ipv6.rt6_stats->fib_rt_uncache); in ip6_pol_route()
2247 rt = net->ipv6.ip6_null_entry; in ip6_pol_route()
2505 dst = &net->ipv6.ip6_null_entry->dst; in ip6_route_output_flags()
2524 atomic_inc(&net->ipv6.rt6_stats->fib_rt_alloc); in ip6_blackhole_route()
2688 rt6_update_expires(rt, net->ipv6.sysctl.ip6_rt_mtu_expires); in rt6_do_update_pmtu()
2946 rt = net->ipv6.fib6_null_entry; in __ip6_route_redirect()
2948 ret = net->ipv6.ip6_null_entry; in __ip6_route_redirect()
2952 if (rt == net->ipv6.fib6_null_entry) { in __ip6_route_redirect()
3044 if (mtu < net->ipv6.sysctl.ip6_rt_min_advmss) in ip6_default_advmss()
3045 mtu = net->ipv6.sysctl.ip6_rt_min_advmss; in ip6_default_advmss()
3153 atomic_inc(&net->ipv6.rt6_stats->fib_rt_uncache); in icmp6_dst_alloc()
3163 struct net *net = container_of(ops, struct net, ipv6.ip6_dst_ops); in ip6_dst_gc()
3164 int rt_min_interval = net->ipv6.sysctl.ip6_rt_gc_min_interval; in ip6_dst_gc()
3165 int rt_max_size = net->ipv6.sysctl.ip6_rt_max_size; in ip6_dst_gc()
3166 int rt_elasticity = net->ipv6.sysctl.ip6_rt_gc_elasticity; in ip6_dst_gc()
3167 int rt_gc_timeout = net->ipv6.sysctl.ip6_rt_gc_timeout; in ip6_dst_gc()
3168 unsigned long rt_last_gc = net->ipv6.ip6_rt_last_gc; in ip6_dst_gc()
3176 net->ipv6.ip6_rt_gc_expire++; in ip6_dst_gc()
3177 fib6_run_gc(net->ipv6.ip6_rt_gc_expire, net, true); in ip6_dst_gc()
3180 net->ipv6.ip6_rt_gc_expire = rt_gc_timeout>>1; in ip6_dst_gc()
3182 net->ipv6.ip6_rt_gc_expire -= net->ipv6.ip6_rt_gc_expire>>rt_elasticity; in ip6_dst_gc()
3208 if (!err && res->f6i != net->ipv6.fib6_null_entry) in ip6_nh_lookup_table()
3718 if (rt == net->ipv6.fib6_null_entry) { in __ip6_del_rt()
3748 if (rt == net->ipv6.fib6_null_entry) in __ip6_del_rt_siblings()
4253 head = &net->ipv6.fib_table_hash[h]; in rt6_purge_dflt_routers()
4434 rt != net->ipv6.fib6_null_entry && in fib6_remove_prefsrc()
4593 if (rt != net->ipv6.fib6_null_entry && !rt->nh && in fib6_ifup()
4679 if (rt == net->ipv6.fib6_null_entry || rt->nh) in fib6_ifdown()
4726 if (net->ipv6.sysctl.skip_notify_on_dev_down) in rt6_sync_down_dev()
5634 if (rt == net->ipv6.fib6_null_entry) in rt6_dump_route()
5861 if (rt == net->ipv6.ip6_null_entry) { in inet6_rtm_getroute()
5977 net->ipv6.fib6_null_entry->fib6_nh->fib_nh_dev = dev; in ip6_route_dev_notify()
5978 net->ipv6.ip6_null_entry->dst.dev = dev; in ip6_route_dev_notify()
5979 net->ipv6.ip6_null_entry->rt6i_idev = in6_dev_get(dev); in ip6_route_dev_notify()
5981 net->ipv6.ip6_prohibit_entry->dst.dev = dev; in ip6_route_dev_notify()
5982 net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev); in ip6_route_dev_notify()
5983 net->ipv6.ip6_blk_hole_entry->dst.dev = dev; in ip6_route_dev_notify()
5984 net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); in ip6_route_dev_notify()
5991 in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev); in ip6_route_dev_notify()
5993 in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev); in ip6_route_dev_notify()
5994 in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev); in ip6_route_dev_notify()
6010 net->ipv6.rt6_stats->fib_nodes, in rt6_stats_seq_show()
6011 net->ipv6.rt6_stats->fib_route_nodes, in rt6_stats_seq_show()
6012 atomic_read(&net->ipv6.rt6_stats->fib_rt_alloc), in rt6_stats_seq_show()
6013 net->ipv6.rt6_stats->fib_rt_entries, in rt6_stats_seq_show()
6014 net->ipv6.rt6_stats->fib_rt_cache, in rt6_stats_seq_show()
6015 dst_entries_get_slow(&net->ipv6.ip6_dst_ops), in rt6_stats_seq_show()
6016 net->ipv6.rt6_stats->fib_discarded_routes); in rt6_stats_seq_show()
6035 delay = net->ipv6.sysctl.flush_delay; in ipv6_sysctl_rtcache_flush()
6047 .data = &init_net.ipv6.sysctl.flush_delay,
6061 .data = &init_net.ipv6.sysctl.ip6_rt_max_size,
6068 .data = &init_net.ipv6.sysctl.ip6_rt_gc_min_interval,
6075 .data = &init_net.ipv6.sysctl.ip6_rt_gc_timeout,
6082 .data = &init_net.ipv6.sysctl.ip6_rt_gc_interval,
6089 .data = &init_net.ipv6.sysctl.ip6_rt_gc_elasticity,
6096 .data = &init_net.ipv6.sysctl.ip6_rt_mtu_expires,
6103 .data = &init_net.ipv6.sysctl.ip6_rt_min_advmss,
6110 .data = &init_net.ipv6.sysctl.ip6_rt_gc_min_interval,
6117 .data = &init_net.ipv6.sysctl.skip_notify_on_dev_down,
6136 table[0].data = &net->ipv6.sysctl.flush_delay; in ipv6_route_sysctl_init()
6138 table[1].data = &net->ipv6.ip6_dst_ops.gc_thresh; in ipv6_route_sysctl_init()
6139 table[2].data = &net->ipv6.sysctl.ip6_rt_max_size; in ipv6_route_sysctl_init()
6140 table[3].data = &net->ipv6.sysctl.ip6_rt_gc_min_interval; in ipv6_route_sysctl_init()
6141 table[4].data = &net->ipv6.sysctl.ip6_rt_gc_timeout; in ipv6_route_sysctl_init()
6142 table[5].data = &net->ipv6.sysctl.ip6_rt_gc_interval; in ipv6_route_sysctl_init()
6143 table[6].data = &net->ipv6.sysctl.ip6_rt_gc_elasticity; in ipv6_route_sysctl_init()
6144 table[7].data = &net->ipv6.sysctl.ip6_rt_mtu_expires; in ipv6_route_sysctl_init()
6145 table[8].data = &net->ipv6.sysctl.ip6_rt_min_advmss; in ipv6_route_sysctl_init()
6146 table[9].data = &net->ipv6.sysctl.ip6_rt_gc_min_interval; in ipv6_route_sysctl_init()
6147 table[10].data = &net->ipv6.sysctl.skip_notify_on_dev_down; in ipv6_route_sysctl_init()
6162 memcpy(&net->ipv6.ip6_dst_ops, &ip6_dst_ops_template, in ip6_route_net_init()
6163 sizeof(net->ipv6.ip6_dst_ops)); in ip6_route_net_init()
6165 if (dst_entries_init(&net->ipv6.ip6_dst_ops) < 0) in ip6_route_net_init()
6168 net->ipv6.fib6_null_entry = fib6_info_alloc(GFP_KERNEL, true); in ip6_route_net_init()
6169 if (!net->ipv6.fib6_null_entry) in ip6_route_net_init()
6171 memcpy(net->ipv6.fib6_null_entry, &fib6_null_entry_template, in ip6_route_net_init()
6172 sizeof(*net->ipv6.fib6_null_entry)); in ip6_route_net_init()
6174 net->ipv6.ip6_null_entry = kmemdup(&ip6_null_entry_template, in ip6_route_net_init()
6175 sizeof(*net->ipv6.ip6_null_entry), in ip6_route_net_init()
6177 if (!net->ipv6.ip6_null_entry) in ip6_route_net_init()
6179 net->ipv6.ip6_null_entry->dst.ops = &net->ipv6.ip6_dst_ops; in ip6_route_net_init()
6180 dst_init_metrics(&net->ipv6.ip6_null_entry->dst, in ip6_route_net_init()
6182 INIT_LIST_HEAD(&net->ipv6.ip6_null_entry->rt6i_uncached); in ip6_route_net_init()
6185 net->ipv6.fib6_has_custom_rules = false; in ip6_route_net_init()
6186 net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template, in ip6_route_net_init()
6187 sizeof(*net->ipv6.ip6_prohibit_entry), in ip6_route_net_init()
6189 if (!net->ipv6.ip6_prohibit_entry) in ip6_route_net_init()
6191 net->ipv6.ip6_prohibit_entry->dst.ops = &net->ipv6.ip6_dst_ops; in ip6_route_net_init()
6192 dst_init_metrics(&net->ipv6.ip6_prohibit_entry->dst, in ip6_route_net_init()
6194 INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->rt6i_uncached); in ip6_route_net_init()
6196 net->ipv6.ip6_blk_hole_entry = kmemdup(&ip6_blk_hole_entry_template, in ip6_route_net_init()
6197 sizeof(*net->ipv6.ip6_blk_hole_entry), in ip6_route_net_init()
6199 if (!net->ipv6.ip6_blk_hole_entry) in ip6_route_net_init()
6201 net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops; in ip6_route_net_init()
6202 dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst, in ip6_route_net_init()
6204 INIT_LIST_HEAD(&net->ipv6.ip6_blk_hole_entry->rt6i_uncached); in ip6_route_net_init()
6207 net->ipv6.sysctl.flush_delay = 0; in ip6_route_net_init()
6208 net->ipv6.sysctl.ip6_rt_max_size = 4096; in ip6_route_net_init()
6209 net->ipv6.sysctl.ip6_rt_gc_min_interval = HZ / 2; in ip6_route_net_init()
6210 net->ipv6.sysctl.ip6_rt_gc_timeout = 60*HZ; in ip6_route_net_init()
6211 net->ipv6.sysctl.ip6_rt_gc_interval = 30*HZ; in ip6_route_net_init()
6212 net->ipv6.sysctl.ip6_rt_gc_elasticity = 9; in ip6_route_net_init()
6213 net->ipv6.sysctl.ip6_rt_mtu_expires = 10*60*HZ; in ip6_route_net_init()
6214 net->ipv6.sysctl.ip6_rt_min_advmss = IPV6_MIN_MTU - 20 - 40; in ip6_route_net_init()
6215 net->ipv6.sysctl.skip_notify_on_dev_down = 0; in ip6_route_net_init()
6217 net->ipv6.ip6_rt_gc_expire = 30*HZ; in ip6_route_net_init()
6225 kfree(net->ipv6.ip6_prohibit_entry); in ip6_route_net_init()
6227 kfree(net->ipv6.ip6_null_entry); in ip6_route_net_init()
6230 kfree(net->ipv6.fib6_null_entry); in ip6_route_net_init()
6232 dst_entries_destroy(&net->ipv6.ip6_dst_ops); in ip6_route_net_init()
6239 kfree(net->ipv6.fib6_null_entry); in ip6_route_net_exit()
6240 kfree(net->ipv6.ip6_null_entry); in ip6_route_net_exit()
6242 kfree(net->ipv6.ip6_prohibit_entry); in ip6_route_net_exit()
6243 kfree(net->ipv6.ip6_blk_hole_entry); in ip6_route_net_exit()
6245 dst_entries_destroy(&net->ipv6.ip6_dst_ops); in ip6_route_net_exit()
6279 net->ipv6.peers = bp; in ipv6_inetpeer_init()
6285 struct inet_peer_base *bp = net->ipv6.peers; in ipv6_inetpeer_exit()
6287 net->ipv6.peers = NULL; in ipv6_inetpeer_exit()
6312 init_net.ipv6.fib6_null_entry->fib6_nh->fib_nh_dev = init_net.loopback_dev; in ip6_route_init_special_entries()
6313 init_net.ipv6.ip6_null_entry->dst.dev = init_net.loopback_dev; in ip6_route_init_special_entries()
6314 init_net.ipv6.ip6_null_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); in ip6_route_init_special_entries()
6316 init_net.ipv6.ip6_prohibit_entry->dst.dev = init_net.loopback_dev; in ip6_route_init_special_entries()
6317 init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); in ip6_route_init_special_entries()
6318 init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; in ip6_route_init_special_entries()
6319 init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); in ip6_route_init_special_entries()