aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2026-05-21 19:52:34 +0200
committerStefano Brivio <sbrivio@redhat.com>2026-05-26 12:15:31 +0200
commit5038f925b028f2faa401b3210327c1de1a24e84b (patch)
treeff28e9101b3e2673953a45af4c856f72e9c416d9
parentd00255bd3ccc3b19099fb34ab278b06d6be2ca59 (diff)
downloadpasst-5038f925b028f2faa401b3210327c1de1a24e84b.tar
passt-5038f925b028f2faa401b3210327c1de1a24e84b.tar.gz
passt-5038f925b028f2faa401b3210327c1de1a24e84b.tar.bz2
passt-5038f925b028f2faa401b3210327c1de1a24e84b.tar.lz
passt-5038f925b028f2faa401b3210327c1de1a24e84b.tar.xz
passt-5038f925b028f2faa401b3210327c1de1a24e84b.tar.zst
passt-5038f925b028f2faa401b3210327c1de1a24e84b.zip
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 <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r--netlink.c10
1 files 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