From: Johannes Nixdorf <jnixdorf-oss@avm.de>
To: "David S. Miller" <davem@davemloft.net>,
Andrew Lunn <andrew@lunn.ch>, David Ahern <dsahern@gmail.com>,
Eric Dumazet <edumazet@google.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Ido Schimmel <idosch@nvidia.com>,
Jakub Kicinski <kuba@kernel.org>,
Nikolay Aleksandrov <razor@blackwall.org>,
Oleksij Rempel <linux@rempel-privat.de>,
Paolo Abeni <pabeni@redhat.com>, Roopa Prabhu <roopa@nvidia.com>,
Shuah Khan <shuah@kernel.org>,
Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: netdev@vger.kernel.org, bridge@lists.linux-foundation.org,
Johannes Nixdorf <jnixdorf-oss@avm.de>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: [Bridge] [PATCH net-next v5 4/5] net: bridge: Set strict_start_type for br_policy
Date: Mon, 16 Oct 2023 15:27:23 +0200 [thread overview]
Message-ID: <20231016-fdb_limit-v5-4-32cddff87758@avm.de> (raw)
In-Reply-To: <20231016-fdb_limit-v5-0-32cddff87758@avm.de>
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>
---
net/bridge/br_netlink.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index 0c3cf6e6dea2..5ad4abfcb7ba 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -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 },
--
2.42.0
next prev parent reply other threads:[~2023-10-16 13:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-16 13:27 [Bridge] [PATCH net-next v5 0/5] bridge: Add a limit on learned FDB entries Johannes Nixdorf
2023-10-16 13:27 ` [Bridge] [PATCH net-next v5 1/5] net: bridge: Set BR_FDB_ADDED_BY_USER early in fdb_add_entry Johannes Nixdorf
2023-10-16 13:27 ` [Bridge] [PATCH net-next v5 2/5] net: bridge: Track and limit dynamically learned FDB entries Johannes Nixdorf
2023-10-16 13:27 ` [Bridge] [PATCH net-next v5 3/5] net: bridge: Add netlink knobs for number / max " Johannes Nixdorf
2023-10-17 9:31 ` Nikolay Aleksandrov
2023-10-17 11:06 ` Ido Schimmel
2023-10-16 13:27 ` Johannes Nixdorf [this message]
2023-10-17 9:32 ` [Bridge] [PATCH net-next v5 4/5] net: bridge: Set strict_start_type for br_policy Nikolay Aleksandrov
2023-10-17 11:06 ` Ido Schimmel
2023-10-16 13:27 ` [Bridge] [PATCH net-next v5 5/5] selftests: forwarding: bridge_fdb_learning_limit: Add a new selftest Johannes Nixdorf
2023-10-18 1:00 ` [Bridge] [PATCH net-next v5 0/5] bridge: Add a limit on learned FDB entries patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231016-fdb_limit-v5-4-32cddff87758@avm.de \
--to=jnixdorf-oss@avm.de \
--cc=andrew@lunn.ch \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux@rempel-privat.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.org \
--cc=roopa@nvidia.com \
--cc=shuah@kernel.org \
--cc=vladimir.oltean@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox