Re: [PATCH net-next 1/3] net: bridge: add fdb flag to extent locked port feature
From: Ido Schimmel <hidden>
Date: 2022-03-15 11:00:29
Also in:
bridge, lkml
From: Ido Schimmel <hidden>
Date: 2022-03-15 11:00:29
Also in:
bridge, lkml
On Tue, Mar 15, 2022 at 09:48:52AM +0100, Hans Schultz wrote:
On mån, mar 14, 2022 at 17:30, Ido Schimmel [off-list ref] wrote:quoted
On Thu, Mar 10, 2022 at 03:23:18PM +0100, Hans Schultz wrote:quoted
@@ -94,8 +95,16 @@ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb br_fdb_find_rcu(br, eth_hdr(skb)->h_source, vid); if (!fdb_src || READ_ONCE(fdb_src->dst) != p || - test_bit(BR_FDB_LOCAL, &fdb_src->flags)) + test_bit(BR_FDB_LOCAL, &fdb_src->flags)) { + if (!fdb_src) { + set_bit(BR_FDB_ENTRY_LOCKED, &flags);This flag is read-only for user space, right? That is, the kernel needs to reject it during netlink policy validation.Yes, the flag is only readable from user space, unless there is a wish to change that.
OK, so please spell it out in the commit message so that it is clear the flag can only be set by the kernel.