diff options
author | Thomas Graf <tgraf@suug.ch> | 2006-11-09 18:22:48 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:21:41 -0500 |
commit | 1f6c9557e8206757c91b5737bb8dbd5b1ae3a773 (patch) | |
tree | 79673ee5d51384a73ca5604d73350f859215169e /include/net/fib_rules.h | |
parent | b8964ed9fa727109c9084abc807652ebfb681c18 (diff) |
[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>
Diffstat (limited to 'include/net/fib_rules.h')
-rw-r--r-- | include/net/fib_rules.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h index 68542b565cf7..e4ba781d289f 100644 --- a/include/net/fib_rules.h +++ b/include/net/fib_rules.h | |||
@@ -59,6 +59,13 @@ struct fib_rules_ops | |||
59 | struct module *owner; | 59 | struct module *owner; |
60 | }; | 60 | }; |
61 | 61 | ||
62 | #define FRA_GENERIC_POLICY \ | ||
63 | [FRA_IFNAME] = { .type = NLA_STRING, .len = IFNAMSIZ - 1 }, \ | ||
64 | [FRA_PRIORITY] = { .type = NLA_U32 }, \ | ||
65 | [FRA_FWMARK] = { .type = NLA_U32 }, \ | ||
66 | [FRA_FWMASK] = { .type = NLA_U32 }, \ | ||
67 | [FRA_TABLE] = { .type = NLA_U32 } | ||
68 | |||
62 | static inline void fib_rule_get(struct fib_rule *rule) | 69 | static inline void fib_rule_get(struct fib_rule *rule) |
63 | { | 70 | { |
64 | atomic_inc(&rule->refcnt); | 71 | atomic_inc(&rule->refcnt); |