diff options
author | 2019-05-22 12:07:43 -0700 | |
---|---|---|
committer | 2019-05-22 17:50:24 -0700 | |
commit | 75425657fe3ad853b300976966d8fafa3f209b89 (patch) | |
tree | 6ec1b0dadf34348c24bdc764b2e3b5c782cc030c /include | |
parent | Merge branch 'net-Export-functions-for-nexthop-code' (diff) | |
download | linux-75425657fe3ad853b300976966d8fafa3f209b89.tar.gz linux-75425657fe3ad853b300976966d8fafa3f209b89.tar.bz2 linux-75425657fe3ad853b300976966d8fafa3f209b89.zip |
net: Set strict_start_type for routes and rules
New userspace on an older kernel can send unknown and unsupported
attributes resulting in an incompelete config which is almost
always wrong for routing (few exceptions are passthrough settings
like the protocol that installed the route).
Set strict_start_type in the policies for IPv4 and IPv6 routes and
rules to detect new, unsupported attributes and fail the route add.
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/fib_rules.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h index b473df5b9512..eba8465e1d86 100644 --- a/include/net/fib_rules.h +++ b/include/net/fib_rules.h @@ -103,6 +103,7 @@ struct fib_rule_notifier_info { }; #define FRA_GENERIC_POLICY \ + [FRA_UNSPEC] = { .strict_start_type = FRA_DPORT_RANGE + 1 }, \ [FRA_IIFNAME] = { .type = NLA_STRING, .len = IFNAMSIZ - 1 }, \ [FRA_OIFNAME] = { .type = NLA_STRING, .len = IFNAMSIZ - 1 }, \ [FRA_PRIORITY] = { .type = NLA_U32 }, \ |