From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id 4F8D15A026E; Thu, 21 May 2026 20:01:46 +0200 (CEST) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH 2/2] netlink: Fix comments to variables for netlink sockets and sequence Date: Thu, 21 May 2026 20:01:46 +0200 Message-ID: <20260521180146.1834333-3-sbrivio@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260521180146.1834333-1-sbrivio@redhat.com> References: <20260521180146.1834333-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: TBJOGYUEP4YDRVRYQGDFREWLG5ECOEJ5 X-Message-ID-Hash: TBJOGYUEP4YDRVRYQGDFREWLG5ECOEJ5 X-MailFrom: sbrivio@passt.top X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Jon Maloy , Paul Holzinger , David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Commit 3c469013cfaa ("netlink: add subscription on changes in NDP/ARP table") added the descriptor for the new socket, int nl_sock_neigh, next to the variables for the existing sockets, without updating the comment, and before the variable reserved for the sequence number. That seems to suggest that the sequence number applies to the notifier socket as well, but that's not the case. Further, the comment didn't match anymore. Move the variable declaration for nl_sock_neigh below, and add a separate comment for it, actually describing it. While at it, fix the indentation. Fixes: 3c469013cfaa ("netlink: add subscription on changes in NDP/ARP table") Signed-off-by: Stefano Brivio --- netlink.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/netlink.c b/netlink.c index 0863734..8d20dbb 100644 --- a/netlink.c +++ b/netlink.c @@ -56,10 +56,12 @@ #define NLBUFSIZ 65536 /* Socket in init, in target namespace, sequence (just needs to be monotonic) */ -int nl_sock = -1; -int nl_sock_ns = -1; -static int nl_sock_neigh = -1; -static int nl_seq = 1; +int nl_sock = -1; +int nl_sock_ns = -1; +static int nl_seq = 1; + +/* Socket for neighbour event notifier */ +static int nl_sock_neigh = -1; /** * nl_sock_init_do() - Set up netlink sockets in init or target namespace -- 2.43.0