diff options
author | Petr Machata <petrm@nvidia.com> | 2023-02-02 20:59:19 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-02-06 11:48:25 +0300 |
commit | c00041cf1cb82fcc8002454c8c1d80bd7e9b7e3e (patch) | |
tree | afbbf684b81bec7734dfe99971d7a7f518a40d7c /net/bridge/br_netlink_tunnel.c | |
parent | 8b7018fa7177aa4358f270fc8db36e59c55a6c21 (diff) | |
download | linux-c00041cf1cb82fcc8002454c8c1d80bd7e9b7e3e.tar.xz |
net: bridge: Set strict_start_type at two policies
Make any attributes newly-added to br_port_policy or vlan_tunnel_policy
parsed strictly, to prevent userspace from passing garbage. Note that this
patchset only touches the former policy. The latter was adjusted for
completeness' sake. There do not appear to be other _deprecated calls
with non-NULL policies.
Suggested-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_netlink_tunnel.c')
-rw-r--r-- | net/bridge/br_netlink_tunnel.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bridge/br_netlink_tunnel.c b/net/bridge/br_netlink_tunnel.c index 8914290c75d4..17abf092f7ca 100644 --- a/net/bridge/br_netlink_tunnel.c +++ b/net/bridge/br_netlink_tunnel.c @@ -188,6 +188,9 @@ initvars: } static const struct nla_policy vlan_tunnel_policy[IFLA_BRIDGE_VLAN_TUNNEL_MAX + 1] = { + [IFLA_BRIDGE_VLAN_TUNNEL_UNSPEC] = { + .strict_start_type = IFLA_BRIDGE_VLAN_TUNNEL_FLAGS + 1 + }, [IFLA_BRIDGE_VLAN_TUNNEL_ID] = { .type = NLA_U32 }, [IFLA_BRIDGE_VLAN_TUNNEL_VID] = { .type = NLA_U16 }, [IFLA_BRIDGE_VLAN_TUNNEL_FLAGS] = { .type = NLA_U16 }, |