diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h index f7351b0ad5524b0f4df12ad11335f8cedc52e6a3..e9a074cf59edffc20d52372238d58c8d6051ced7 100644 --- a/include/net/fib_rules.h +++ b/include/net/fib_rules.h @@ -56,7 +56,7 @@ struct fib_rules_ops int (*fill)(struct fib_rule *, struct sk_buff *, struct nlmsghdr *, struct fib_rule_hdr *); - u32 (*default_pref)(void); + u32 (*default_pref)(struct fib_rules_ops *ops); size_t (*nlmsg_payload)(struct fib_rule *); /* Called after modifications to the rules set, must flush diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index ada9c8155e3c4570e554eaf8480b5bb1b6445f4a..e12e9f583949dea531388a6300e3a9090a8e2c71 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) rule->table = frh_get_table(frh, tb); if (!rule->pref && ops->default_pref) - rule->pref = ops->default_pref(); + rule->pref = ops->default_pref(ops); err = -EINVAL; if (tb[FRA_GOTO]) { diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c index 0b5e2b97e15a1257fa0e27344564b3f62555851a..c1fae23d2263fc945c1a845f16b6c7349fff0a0c 100644 --- a/net/decnet/dn_rules.c +++ b/net/decnet/dn_rules.c @@ -212,7 +212,7 @@ static int dn_fib_rule_fill(struct fib_rule *rule, struct sk_buff *skb, return -ENOBUFS; } -static u32 dn_fib_rule_default_pref(void) +static u32 dn_fib_rule_default_pref(struct fib_rules_ops *ops) { struct list_head *pos; struct fib_rule *rule; diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c index eac3f717ecabd833777e94c63e746f263dc157b9..afe669dd1bd53f9a7f4d832a9d3de4d884e77700 100644 --- a/net/ipv4/fib_rules.c +++ b/net/ipv4/fib_rules.c @@ -245,7 +245,7 @@ static int fib4_rule_fill(struct fib_rule *rule, struct sk_buff *skb, return -ENOBUFS; } -static u32 fib4_rule_default_pref(void) +static u32 fib4_rule_default_pref(struct fib_rules_ops *ops) { struct list_head *pos; struct fib_rule *rule; diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c index e4d7e5a08b4060a06dd70e815aff20fac95f45d2..76437a1fcab0e3c50990695f1ca6d80fb8e4758f 100644 --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c @@ -223,7 +223,7 @@ static int fib6_rule_fill(struct fib_rule *rule, struct sk_buff *skb, return -ENOBUFS; } -static u32 fib6_rule_default_pref(void) +static u32 fib6_rule_default_pref(struct fib_rules_ops *ops) { return 0x3FFF; }