mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
fib_rules: fix suppressor names and default values
This change brings the suppressor attribute names into line; it also changes the data types to provide a more consistent interface. While -1 indicates that the suppressor is not enabled, values >= 0 for suppress_prefixlen or suppress_ifgroup reject routing decisions violating the constraint. This changes the previously presented behaviour of suppress_prefixlen, where a prefix length _less_ than the attribute value was rejected. After this change, a prefix length less than *or* equal to the value is considered a violation of the rule constraint. It also changes the default values for default and newly added rules (disabling any suppression for those). Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0c0667a854
commit
73f5698e77
5 changed files with 16 additions and 9 deletions
|
@ -19,7 +19,7 @@ struct fib_rule {
|
|||
u32 flags;
|
||||
u32 table;
|
||||
int suppress_ifgroup;
|
||||
u8 table_prefixlen_min;
|
||||
int suppress_prefixlen;
|
||||
u8 action;
|
||||
u32 target;
|
||||
struct fib_rule __rcu *ctarget;
|
||||
|
@ -84,7 +84,7 @@ struct fib_rules_ops {
|
|||
[FRA_FWMARK] = { .type = NLA_U32 }, \
|
||||
[FRA_FWMASK] = { .type = NLA_U32 }, \
|
||||
[FRA_TABLE] = { .type = NLA_U32 }, \
|
||||
[FRA_TABLE_PREFIXLEN_MIN] = { .type = NLA_U8 }, \
|
||||
[FRA_SUPPRESS_PREFIXLEN] = { .type = NLA_U32 }, \
|
||||
[FRA_SUPPRESS_IFGROUP] = { .type = NLA_U32 }, \
|
||||
[FRA_GOTO] = { .type = NLA_U32 }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue