net: fib_rules: mark arguments to fib_rules_register const and __net_initdata
fib_rules_register() duplicates the template passed to it without modification, mark the argument as const. Additionally the templates are only needed when instantiating a new namespace, so mark them as __net_initdata, which means they can be discarded when CONFIG_NET_NS=n. Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
@@ -104,7 +104,7 @@ static inline u32 frh_get_table(struct fib_rule_hdr *frh, struct nlattr **nla)
|
||||
return frh->table;
|
||||
}
|
||||
|
||||
extern struct fib_rules_ops *fib_rules_register(struct fib_rules_ops *, struct net *);
|
||||
extern struct fib_rules_ops *fib_rules_register(const struct fib_rules_ops *, struct net *);
|
||||
extern void fib_rules_unregister(struct fib_rules_ops *);
|
||||
extern void fib_rules_cleanup_ops(struct fib_rules_ops *);
|
||||
|
||||
|
Reference in New Issue
Block a user