From: Nikolay Aleksandrov <razor@blackwall.org>
To: Daniel Borkmann <daniel@iogearbox.net>, netdev@vger.kernel.org
Cc: bpf@vger.kernel.org, kuba@kernel.org, dw@davidwei.uk, pabeni@redhat.com
Subject: Re: [PATCH net-next] netkit: Don't emit scrub attribute for single device mode
Date: Fri, 10 Apr 2026 10:43:12 +0300 [thread overview]
Message-ID: <a3dac5ce-250b-4d13-ade1-8036b454e21f@blackwall.org> (raw)
In-Reply-To: <20260410072334.548232-1-daniel@iogearbox.net>
On 4/10/26 10:23, Daniel Borkmann wrote:
> When userspace reads a single mode netkit device via RTM_GETLINK,
> it receives IFLA_NETKIT_SCRUB=NETKIT_SCRUB_DEFAULT attribute from
> netkit_fill_info(). If that attribute is echoed back to recreate
> the device, the seen_scrub presence check in netkit_new_link()
> causes creation to fail with -EOPNOTSUPP. Since it has no meaning
> for single devices at this point, just don't dump it.
>
> Fixes: 481038960538 ("netkit: Add single device mode for netkit")
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
> ---
> drivers/net/netkit.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/netkit.c b/drivers/net/netkit.c
> index 5619209329d5..7b56a7ad7a49 100644
> --- a/drivers/net/netkit.c
> +++ b/drivers/net/netkit.c
> @@ -1214,7 +1214,8 @@ static int netkit_fill_info(struct sk_buff *skb, const struct net_device *dev)
> return -EMSGSIZE;
> if (nla_put_u32(skb, IFLA_NETKIT_MODE, nk->mode))
> return -EMSGSIZE;
> - if (nla_put_u32(skb, IFLA_NETKIT_SCRUB, nk->scrub))
> + if (nk->pair == NETKIT_DEVICE_PAIR &&
> + nla_put_u32(skb, IFLA_NETKIT_SCRUB, nk->scrub))
> return -EMSGSIZE;
> if (nla_put_u16(skb, IFLA_NETKIT_HEADROOM, dev->needed_headroom))
> return -EMSGSIZE;
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
prev parent reply other threads:[~2026-04-10 7:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-10 7:23 [PATCH net-next] netkit: Don't emit scrub attribute for single device mode Daniel Borkmann
2026-04-10 7:43 ` Nikolay Aleksandrov [this message]
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=a3dac5ce-250b-4d13-ade1-8036b454e21f@blackwall.org \
--to=razor@blackwall.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=dw@davidwei.uk \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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