diff options
author | Denis V. Lunev <den@openvz.org> | 2008-01-10 06:18:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:01:22 -0500 |
commit | 868d13ac811746e28e4c806f2b1bd8575796f9af (patch) | |
tree | 9629052707e471597afd13771e23b31b3b11b539 | |
parent | f8c26b8d589867aed8251db2935f8aa03aa68717 (diff) |
[NETNS]: Pass fib_rules_ops into default_pref method.
fib_rules_ops contains operations and the list of configured rules. ops will
become per/namespace soon, so we need them to be known in the default_pref
callback.
Acked-by: Benjamin Thery <benjamin.thery@bull.net>
Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/fib_rules.h | 2 | ||||
-rw-r--r-- | net/core/fib_rules.c | 2 | ||||
-rw-r--r-- | net/decnet/dn_rules.c | 2 | ||||
-rw-r--r-- | net/ipv4/fib_rules.c | 2 | ||||
-rw-r--r-- | net/ipv6/fib6_rules.c | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h index f7351b0ad552..e9a074cf59ed 100644 --- a/include/net/fib_rules.h +++ b/include/net/fib_rules.h | |||
@@ -56,7 +56,7 @@ struct fib_rules_ops | |||
56 | int (*fill)(struct fib_rule *, struct sk_buff *, | 56 | int (*fill)(struct fib_rule *, struct sk_buff *, |
57 | struct nlmsghdr *, | 57 | struct nlmsghdr *, |
58 | struct fib_rule_hdr *); | 58 | struct fib_rule_hdr *); |
59 | u32 (*default_pref)(void); | 59 | u32 (*default_pref)(struct fib_rules_ops *ops); |
60 | size_t (*nlmsg_payload)(struct fib_rule *); | 60 | size_t (*nlmsg_payload)(struct fib_rule *); |
61 | 61 | ||
62 | /* Called after modifications to the rules set, must flush | 62 | /* Called after modifications to the rules set, must flush |
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index ada9c8155e3c..e12e9f583949 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c | |||
@@ -285,7 +285,7 @@ static int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) | |||
285 | rule->table = frh_get_table(frh, tb); | 285 | rule->table = frh_get_table(frh, tb); |
286 | 286 | ||
287 | if (!rule->pref && ops->default_pref) | 287 | if (!rule->pref && ops->default_pref) |
288 | rule->pref = ops->default_pref(); | 288 | rule->pref = ops->default_pref(ops); |
289 | 289 | ||
290 | err = -EINVAL; | 290 | err = -EINVAL; |
291 | if (tb[FRA_GOTO]) { | 291 | if (tb[FRA_GOTO]) { |
diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c index 0b5e2b97e15a..c1fae23d2263 100644 --- a/net/decnet/dn_rules.c +++ b/net/decnet/dn_rules.c | |||
@@ -212,7 +212,7 @@ nla_put_failure: | |||
212 | return -ENOBUFS; | 212 | return -ENOBUFS; |
213 | } | 213 | } |
214 | 214 | ||
215 | static u32 dn_fib_rule_default_pref(void) | 215 | static u32 dn_fib_rule_default_pref(struct fib_rules_ops *ops) |
216 | { | 216 | { |
217 | struct list_head *pos; | 217 | struct list_head *pos; |
218 | struct fib_rule *rule; | 218 | struct fib_rule *rule; |
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c index eac3f717ecab..afe669dd1bd5 100644 --- a/net/ipv4/fib_rules.c +++ b/net/ipv4/fib_rules.c | |||
@@ -245,7 +245,7 @@ nla_put_failure: | |||
245 | return -ENOBUFS; | 245 | return -ENOBUFS; |
246 | } | 246 | } |
247 | 247 | ||
248 | static u32 fib4_rule_default_pref(void) | 248 | static u32 fib4_rule_default_pref(struct fib_rules_ops *ops) |
249 | { | 249 | { |
250 | struct list_head *pos; | 250 | struct list_head *pos; |
251 | struct fib_rule *rule; | 251 | struct fib_rule *rule; |
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c index e4d7e5a08b40..76437a1fcab0 100644 --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c | |||
@@ -223,7 +223,7 @@ nla_put_failure: | |||
223 | return -ENOBUFS; | 223 | return -ENOBUFS; |
224 | } | 224 | } |
225 | 225 | ||
226 | static u32 fib6_rule_default_pref(void) | 226 | static u32 fib6_rule_default_pref(struct fib_rules_ops *ops) |
227 | { | 227 | { |
228 | return 0x3FFF; | 228 | return 0x3FFF; |
229 | } | 229 | } |