fib6_rules.c (163849ea9b4c5d50fbd324692461983d18faadad) fib6_rules.c (2c8c1e7297e19bdef3c178c3ea41d898a7716e3e)
1/*
2 * net/ipv6/fib6_rules.c IPv6 Routing Policy Rules
3 *
4 * Copyright (C)2003-2006 Helsinki University of Technology
5 * Copyright (C)2003-2006 USAGI/WIDE Project
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as

--- 248 unchanged lines hidden (view full) ---

257 .default_pref = fib6_rule_default_pref,
258 .nlmsg_payload = fib6_rule_nlmsg_payload,
259 .nlgroup = RTNLGRP_IPV6_RULE,
260 .policy = fib6_rule_policy,
261 .owner = THIS_MODULE,
262 .fro_net = &init_net,
263};
264
1/*
2 * net/ipv6/fib6_rules.c IPv6 Routing Policy Rules
3 *
4 * Copyright (C)2003-2006 Helsinki University of Technology
5 * Copyright (C)2003-2006 USAGI/WIDE Project
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as

--- 248 unchanged lines hidden (view full) ---

257 .default_pref = fib6_rule_default_pref,
258 .nlmsg_payload = fib6_rule_nlmsg_payload,
259 .nlgroup = RTNLGRP_IPV6_RULE,
260 .policy = fib6_rule_policy,
261 .owner = THIS_MODULE,
262 .fro_net = &init_net,
263};
264
265static int fib6_rules_net_init(struct net *net)
265static int __net_init fib6_rules_net_init(struct net *net)
266{
267 struct fib_rules_ops *ops;
268 int err = -ENOMEM;
269
270 ops = fib_rules_register(&fib6_rules_ops_template, net);
271 if (IS_ERR(ops))
272 return PTR_ERR(ops);
273 net->ipv6.fib6_rules_ops = ops;

--- 12 unchanged lines hidden (view full) ---

286out:
287 return err;
288
289out_fib6_rules_ops:
290 fib_rules_unregister(ops);
291 goto out;
292}
293
266{
267 struct fib_rules_ops *ops;
268 int err = -ENOMEM;
269
270 ops = fib_rules_register(&fib6_rules_ops_template, net);
271 if (IS_ERR(ops))
272 return PTR_ERR(ops);
273 net->ipv6.fib6_rules_ops = ops;

--- 12 unchanged lines hidden (view full) ---

286out:
287 return err;
288
289out_fib6_rules_ops:
290 fib_rules_unregister(ops);
291 goto out;
292}
293
294static void fib6_rules_net_exit(struct net *net)
294static void __net_exit fib6_rules_net_exit(struct net *net)
295{
296 fib_rules_unregister(net->ipv6.fib6_rules_ops);
297}
298
299static struct pernet_operations fib6_rules_net_ops = {
300 .init = fib6_rules_net_init,
301 .exit = fib6_rules_net_exit,
302};
303
304int __init fib6_rules_init(void)
305{
306 return register_pernet_subsys(&fib6_rules_net_ops);
307}
308
309
310void fib6_rules_cleanup(void)
311{
312 unregister_pernet_subsys(&fib6_rules_net_ops);
313}
295{
296 fib_rules_unregister(net->ipv6.fib6_rules_ops);
297}
298
299static struct pernet_operations fib6_rules_net_ops = {
300 .init = fib6_rules_net_init,
301 .exit = fib6_rules_net_exit,
302};
303
304int __init fib6_rules_init(void)
305{
306 return register_pernet_subsys(&fib6_rules_net_ops);
307}
308
309
310void fib6_rules_cleanup(void)
311{
312 unregister_pernet_subsys(&fib6_rules_net_ops);
313}