• Home
  • Raw
  • Download

Lines Matching refs:net

50 int fib6_rules_dump(struct net *net, struct notifier_block *nb)  in fib6_rules_dump()  argument
52 return fib_rules_dump(net, nb, AF_INET6); in fib6_rules_dump()
55 unsigned int fib6_rules_seq_read(struct net *net) in fib6_rules_seq_read() argument
57 return fib_rules_seq_read(net, AF_INET6); in fib6_rules_seq_read()
61 int fib6_lookup(struct net *net, int oif, struct flowi6 *fl6, in fib6_lookup() argument
66 if (net->ipv6.fib6_has_custom_rules) { in fib6_lookup()
74 l3mdev_update_flow(net, flowi6_to_flowi(fl6)); in fib6_lookup()
76 err = fib_rules_lookup(net->ipv6.fib6_rules_ops, in fib6_lookup()
79 err = fib6_table_lookup(net, net->ipv6.fib6_local_tbl, oif, in fib6_lookup()
81 if (err || res->f6i == net->ipv6.fib6_null_entry) in fib6_lookup()
82 err = fib6_table_lookup(net, net->ipv6.fib6_main_tbl, in fib6_lookup()
89 struct dst_entry *fib6_rule_lookup(struct net *net, struct flowi6 *fl6, in fib6_rule_lookup() argument
93 if (net->ipv6.fib6_has_custom_rules) { in fib6_rule_lookup()
103 l3mdev_update_flow(net, flowi6_to_flowi(fl6)); in fib6_rule_lookup()
105 fib_rules_lookup(net->ipv6.fib6_rules_ops, in fib6_rule_lookup()
113 rt = lookup(net, net->ipv6.fib6_local_tbl, fl6, skb, flags); in fib6_rule_lookup()
114 if (rt != net->ipv6.ip6_null_entry && rt->dst.error != -EAGAIN) in fib6_rule_lookup()
117 rt = lookup(net, net->ipv6.fib6_main_tbl, fl6, skb, flags); in fib6_rule_lookup()
124 dst_hold(&net->ipv6.ip6_null_entry->dst); in fib6_rule_lookup()
125 return &net->ipv6.ip6_null_entry->dst; in fib6_rule_lookup()
128 static int fib6_rule_saddr(struct net *net, struct fib_rule *rule, int flags, in fib6_rule_saddr() argument
140 if (ipv6_dev_get_saddr(net, dev, &flp6->daddr, in fib6_rule_saddr()
158 struct net *net = rule->fr_net; in fib6_rule_action_alt() local
176 table = fib6_get_table(net, tb_id); in fib6_rule_action_alt()
181 err = fib6_table_lookup(net, table, *oif, flp6, res, flags); in fib6_rule_action_alt()
182 if (!err && res->f6i != net->ipv6.fib6_null_entry) in fib6_rule_action_alt()
183 err = fib6_rule_saddr(net, rule, flags, flp6, in fib6_rule_action_alt()
198 struct net *net = rule->fr_net; in __fib6_rule_action() local
208 rt = net->ipv6.ip6_null_entry; in __fib6_rule_action()
213 rt = net->ipv6.ip6_blk_hole_entry; in __fib6_rule_action()
217 rt = net->ipv6.ip6_prohibit_entry; in __fib6_rule_action()
222 table = fib6_get_table(net, tb_id); in __fib6_rule_action()
228 rt = lookup(net, table, flp6, arg->lookup_data, flags); in __fib6_rule_action()
229 if (rt != net->ipv6.ip6_null_entry) { in __fib6_rule_action()
230 err = fib6_rule_saddr(net, rule, flags, flp6, in __fib6_rule_action()
345 struct net *net = sock_net(skb->sk); in fib6_rule_configure() local
354 if (fib6_new_table(net, rule->table) == NULL) { in fib6_rule_configure()
371 net->ipv6.fib6_rules_require_fldissect++; in fib6_rule_configure()
373 net->ipv6.fib6_has_custom_rules = true; in fib6_rule_configure()
381 struct net *net = rule->fr_net; in fib6_rule_delete() local
383 if (net->ipv6.fib6_rules_require_fldissect && in fib6_rule_delete()
385 net->ipv6.fib6_rules_require_fldissect--; in fib6_rule_delete()
459 static int __net_init fib6_rules_net_init(struct net *net) in fib6_rules_net_init() argument
464 ops = fib_rules_register(&fib6_rules_ops_template, net); in fib6_rules_net_init()
476 net->ipv6.fib6_rules_ops = ops; in fib6_rules_net_init()
477 net->ipv6.fib6_rules_require_fldissect = 0; in fib6_rules_net_init()
486 static void __net_exit fib6_rules_net_exit(struct net *net) in fib6_rules_net_exit() argument
489 fib_rules_unregister(net->ipv6.fib6_rules_ops); in fib6_rules_net_exit()