Release 4.14 net/ipv4/fib_notifier.c
// SPDX-License-Identifier: GPL-2.0
#include <linux/rtnetlink.h>
#include <linux/notifier.h>
#include <linux/socket.h>
#include <linux/kernel.h>
#include <linux/export.h>
#include <net/net_namespace.h>
#include <net/fib_notifier.h>
#include <net/netns/ipv4.h>
#include <net/ip_fib.h>
int call_fib4_notifier(struct notifier_block *nb, struct net *net,
enum fib_event_type event_type,
struct fib_notifier_info *info)
{
info->family = AF_INET;
return call_fib_notifier(nb, net, event_type, info);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ido Schimmel | 42 | 100.00% | 2 | 100.00% |
Total | 42 | 100.00% | 2 | 100.00% |
int call_fib4_notifiers(struct net *net, enum fib_event_type event_type,
struct fib_notifier_info *info)
{
ASSERT_RTNL();
info->family = AF_INET;
net->ipv4.fib_seq++;
return call_fib_notifiers(net, event_type, info);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ido Schimmel | 45 | 100.00% | 2 | 100.00% |
Total | 45 | 100.00% | 2 | 100.00% |
static unsigned int fib4_seq_read(struct net *net)
{
ASSERT_RTNL();
return net->ipv4.fib_seq + fib4_rules_seq_read(net);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ido Schimmel | 27 | 100.00% | 3 | 100.00% |
Total | 27 | 100.00% | 3 | 100.00% |
static int fib4_dump(struct net *net, struct notifier_block *nb)
{
int err;
err = fib4_rules_dump(net, nb);
if (err)
return err;
fib_notify(net, nb);
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ido Schimmel | 45 | 100.00% | 3 | 100.00% |
Total | 45 | 100.00% | 3 | 100.00% |
static const struct fib_notifier_ops fib4_notifier_ops_template = {
.family = AF_INET,
.fib_seq_read = fib4_seq_read,
.fib_dump = fib4_dump,
.owner = THIS_MODULE,
};
int __net_init fib4_notifier_init(struct net *net)
{
struct fib_notifier_ops *ops;
net->ipv4.fib_seq = 0;
ops = fib_notifier_ops_register(&fib4_notifier_ops_template, net);
if (IS_ERR(ops))
return PTR_ERR(ops);
net->ipv4.notifier_ops = ops;
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ido Schimmel | 58 | 100.00% | 2 | 100.00% |
Total | 58 | 100.00% | 2 | 100.00% |
void __net_exit fib4_notifier_exit(struct net *net)
{
fib_notifier_ops_unregister(net->ipv4.notifier_ops);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ido Schimmel | 20 | 100.00% | 2 | 100.00% |
Total | 20 | 100.00% | 2 | 100.00% |
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ido Schimmel | 292 | 99.66% | 4 | 80.00% |
Greg Kroah-Hartman | 1 | 0.34% | 1 | 20.00% |
Total | 293 | 100.00% | 5 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.