mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 20:24:12 +08:00
net: bridge: Set strict_start_type for br_policy
Set any new attributes added to br_policy to be parsed strictly, to prevent userspace from passing garbage. Signed-off-by: Johannes Nixdorf <jnixdorf-oss@avm.de> Acked-by: Nikolay Aleksandrov <razor@blackwall.org> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://lore.kernel.org/r/20231016-fdb_limit-v5-4-32cddff87758@avm.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
ddd1ad6882
commit
19297c3ab2
@ -1229,6 +1229,8 @@ static size_t br_port_get_slave_size(const struct net_device *brdev,
|
||||
}
|
||||
|
||||
static const struct nla_policy br_policy[IFLA_BR_MAX + 1] = {
|
||||
[IFLA_BR_UNSPEC] = { .strict_start_type =
|
||||
IFLA_BR_FDB_N_LEARNED },
|
||||
[IFLA_BR_FORWARD_DELAY] = { .type = NLA_U32 },
|
||||
[IFLA_BR_HELLO_TIME] = { .type = NLA_U32 },
|
||||
[IFLA_BR_MAX_AGE] = { .type = NLA_U32 },
|
||||
|
Loading…
Reference in New Issue
Block a user