[NET] rules: Share common attribute validation policy
Move the attribute policy for the non-specific attributes into net/fib_rules.h and include it in the respective protocols. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
b8964ed9fa
commit
1f6c9557e8
@@ -59,6 +59,13 @@ struct fib_rules_ops
|
||||
struct module *owner;
|
||||
};
|
||||
|
||||
#define FRA_GENERIC_POLICY \
|
||||
[FRA_IFNAME] = { .type = NLA_STRING, .len = IFNAMSIZ - 1 }, \
|
||||
[FRA_PRIORITY] = { .type = NLA_U32 }, \
|
||||
[FRA_FWMARK] = { .type = NLA_U32 }, \
|
||||
[FRA_FWMASK] = { .type = NLA_U32 }, \
|
||||
[FRA_TABLE] = { .type = NLA_U32 }
|
||||
|
||||
static inline void fib_rule_get(struct fib_rule *rule)
|
||||
{
|
||||
atomic_inc(&rule->refcnt);
|
||||
|
Reference in New Issue
Block a user