diff options
Diffstat (limited to 'include/net/fib_rules.h')
-rw-r--r-- | include/net/fib_rules.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h index 017aebd90683..34349f9f4331 100644 --- a/include/net/fib_rules.h +++ b/include/net/fib_rules.h | |||
@@ -22,6 +22,7 @@ struct fib_rule | |||
22 | u32 target; | 22 | u32 target; |
23 | struct fib_rule * ctarget; | 23 | struct fib_rule * ctarget; |
24 | struct rcu_head rcu; | 24 | struct rcu_head rcu; |
25 | struct net * fr_net; | ||
25 | }; | 26 | }; |
26 | 27 | ||
27 | struct fib_lookup_arg | 28 | struct fib_lookup_arg |
@@ -56,7 +57,7 @@ struct fib_rules_ops | |||
56 | int (*fill)(struct fib_rule *, struct sk_buff *, | 57 | int (*fill)(struct fib_rule *, struct sk_buff *, |
57 | struct nlmsghdr *, | 58 | struct nlmsghdr *, |
58 | struct fib_rule_hdr *); | 59 | struct fib_rule_hdr *); |
59 | u32 (*default_pref)(void); | 60 | u32 (*default_pref)(struct fib_rules_ops *ops); |
60 | size_t (*nlmsg_payload)(struct fib_rule *); | 61 | size_t (*nlmsg_payload)(struct fib_rule *); |
61 | 62 | ||
62 | /* Called after modifications to the rules set, must flush | 63 | /* Called after modifications to the rules set, must flush |
@@ -67,6 +68,7 @@ struct fib_rules_ops | |||
67 | const struct nla_policy *policy; | 68 | const struct nla_policy *policy; |
68 | struct list_head rules_list; | 69 | struct list_head rules_list; |
69 | struct module *owner; | 70 | struct module *owner; |
71 | struct net *fro_net; | ||
70 | }; | 72 | }; |
71 | 73 | ||
72 | #define FRA_GENERIC_POLICY \ | 74 | #define FRA_GENERIC_POLICY \ |
@@ -101,10 +103,14 @@ static inline u32 frh_get_table(struct fib_rule_hdr *frh, struct nlattr **nla) | |||
101 | return frh->table; | 103 | return frh->table; |
102 | } | 104 | } |
103 | 105 | ||
104 | extern int fib_rules_register(struct fib_rules_ops *); | 106 | extern int fib_rules_register(struct fib_rules_ops *); |
105 | extern int fib_rules_unregister(struct fib_rules_ops *); | 107 | extern void fib_rules_unregister(struct fib_rules_ops *); |
108 | extern void fib_rules_cleanup_ops(struct fib_rules_ops *); | ||
106 | 109 | ||
107 | extern int fib_rules_lookup(struct fib_rules_ops *, | 110 | extern int fib_rules_lookup(struct fib_rules_ops *, |
108 | struct flowi *, int flags, | 111 | struct flowi *, int flags, |
109 | struct fib_lookup_arg *); | 112 | struct fib_lookup_arg *); |
113 | extern int fib_default_rule_add(struct fib_rules_ops *, | ||
114 | u32 pref, u32 table, | ||
115 | u32 flags); | ||
110 | #endif | 116 | #endif |