From 5038f925b028f2faa401b3210327c1de1a24e84b Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Thu, 21 May 2026 19:52:34 +0200 Subject: netlink: Fix comments to variables for netlink sockets and sequence 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 Reviewed-by: David Gibson --- 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 -- cgit v1.2.3