From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8BA17372EDE for ; Wed, 20 May 2026 17:23:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.67 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779297819; cv=none; b=qHe67gHyMqRaKe/nqoHs+X93dG+OhJiOtDh9DVJQP0EXPWPHxH576GT7vSCGibLJwEQuJ4hHIOeul/xIRlDpKM/VvbZ2B+XFurr99q2+totF9zBQjY8lz5vqKpwC1loHe76lO3AdFSpxKC/J0L/+0kzgJVtaGxGCvE8c2wal4BI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779297819; c=relaxed/simple; bh=SPD46zMf+vaQ0dKfzawI5VFezCApZmoz9FyM0dieZKg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=sgkDB+6JbaZQ/ZMVDMbHMnk5NTykjCGjyXeR0em7UT6xJFiFBcoJxH/LSwiZkvPu2UZTt1rr6BQG1FGWhViyqwVHEPiKFcNrlzaHb4qcaxUxNlagu5mcGGdwT6anMZmCEK0U0ePvtJJzn9n0tfuq/6NIPiNtm5NmSVeGhw4k6fY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ovn.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.221.67 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ovn.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f67.google.com with SMTP id ffacd0b85a97d-43d75312379so4263976f8f.1 for ; Wed, 20 May 2026 10:23:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779297816; x=1779902616; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=tIvRpJlug7n9+LmRFfk3DPM4edMme0ZuT6gdm05cYBg=; b=UQl73dqj92gg+U4+Q+1d1JYTBb056n47dvKEXdJVsF7w3TRMl632rDZqOSgF24Jz3b 3H//9koxMUwIOUlhIxj32+2qvpGdIq86NV9JikQgZrOHfUV88tRLXxL4Iq805qS8Fwh+ ZqF9nrtMff0DZrIOzpsKMe4Fmpcq4DTo4vOH8H3QWmjKL+0DzbhF/OhneCzMbvLM9zYe mw2qrPgwr3ZGSAnsPnz9MwdJC9J7LnZ+D2NvFNT0eDls0XuiD2gvahxZwS5kls0psMXg XIbW+otxIne6LPl+wLA+cAcZfB28Je0YCY4tei21eNvCbot+AjiAThYkQlkJd/y9+jnP 10FQ== X-Forwarded-Encrypted: i=1; AFNElJ9VCqRzVWhm7MJF6DvA5LIfoIjg2jAwK/R0vY3huOR4OHR82tnVCuodNvYFmctL7fTJnVDFT5OdGz4818c=@vger.kernel.org X-Gm-Message-State: AOJu0YwJMzpONgL2s+WvOo4ElgRliNCZbTRSdUpUshshqLyq6oCZ8Jmw 7AYA5fYFR26j0OTcWdD1nZDrwBXGE0Qld296jj0aLt3p4gv66RkSPmSx X-Gm-Gg: Acq92OGSnAzPx3T87x64ORClwRi23Rfno++Az8kLDrt7++PaU1wTZeVl32yBbpsK0CW W+3tS2ERb2WFJv5q7bYigEyNntZFAxRF/A8CsPWuRveboi+EwfofPAGjLRlBfE+KfaXitksq1Zc aesFOLCi7gLU/iBqmWMWaGSgcyUieuvP6tajGxPhz1U0WUMTsXMq+DnLzRXiz25XtOoUGdx4PWZ OL/W1Z7eIHBz/umE5lm0HiMsqnxwMKz2bvrbJXCJlD0pqnvoJNDobVsAtFKtbk4eUqS3ai6jVed DUgCFawO0UwvJ9QlxuH+Af0E8dv56T88oz1WSlTqCL1Orp5hkcR79XNyJmVbfFYiNLzKAXsmf4s 3Un9zDwlqkWp8081ydbGZVxnERZ+qp9bmhjy6sLfk4tynGT5i5VksdMtu+krz2cgve9P4pizDRj wP+Z7Db/CzU0CU9kqStABUwp4YmdrVOipI/yqjUNpYL389dwv06BygL7viKWc= X-Received: by 2002:a05:6000:18a1:b0:43d:78ae:b785 with SMTP id ffacd0b85a97d-45ea0d89f66mr695485f8f.21.1779297815622; Wed, 20 May 2026 10:23:35 -0700 (PDT) Received: from im-t490s.redhat.com (89-24-32-159.nat.epc.tmcz.cz. [89.24.32.159]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45da0fe0fecsm51125580f8f.26.2026.05.20.10.23.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2026 10:23:35 -0700 (PDT) From: Ilya Maximets To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Donald Hunter , Shuah Khan , Kuniyuki Iwashima , Kees Cook , Adrian Moreno , Jiri Benc , Nicolas Dichtel , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Matteo Perin , Ilya Maximets Subject: [PATCH net v2 0/4] netlink: fixes for cross-namespace nsid reporting Date: Wed, 20 May 2026 19:22:34 +0200 Message-ID: <20260520172317.175168-1-i.maximets@ovn.org> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit While working on some new features for OVS and OVN we discovered that self-referential NSIDs get unintentionally allocated in the system as well as unexpectedly reported for local events on all-nsid listeners. More details in the patches. They change user-visible behavior, but the current behavior is arguably a bug, as it makes it hard to use all-nsid sockets without a decent amount of extra unrelated work of tracking when new NSIDs are allocated for your local namespace. Tests are added to check the expected behavior and YNL is extended to support all-nsid sockets in the tests. Version 2: - The RTM_GETLINK change is dropped for now as it is not suitable for net. A fix would require an opt-in flag. [Jiri, Nicolas] - Added a fix for 'nsid_is_set' flag not being reset between sockets. [Sashiko] - Refactored the ynl code: * Moved recvmsg call into a separate method. [Jakub] * Added doc-string for the ntf_listen_all_nsid. [Jakub] * Mentioned it in the Notifications API section. Version 1: - https://lore.kernel.org/netdev/20260515201937.2813983-1-i.maximets@ovn.org/ Ilya Maximets (4): net: netlink: fix sending unassigned nsid after assigned one net: netlink: don't set nsid on local notifications tools: ynl: support listening on all nsids selftests: net: add a test case for nsid in all nsid notifications net/netlink/af_netlink.c | 11 ++-- tools/net/ynl/pyynl/lib/ynl.py | 37 ++++++++++++-- tools/testing/selftests/net/link_netns.py | 61 ++++++++++++++++++++++- 3 files changed, 99 insertions(+), 10 deletions(-) -- 2.53.0