]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/net/fib_rules.h
[NET] rules: Share common attribute validation policy
[net-next-2.6.git] / include / net / fib_rules.h
index 68542b565cf75919b22e1c9ea3d873dba4cad951..e4ba781d289f1aba59d7f836eca386a028de3358 100644 (file)
@@ -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);