On Thu, May 21, 2026 at 08:01:46PM +0200, Stefano Brivio wrote: 11;rgb:ffff/ffff/ffff> 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 -- 2.43.0
-- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson