Skip to content

Commit 5038f92

Browse files
committed
netlink: Fix comments to variables for netlink sockets and sequence
Commit 3c46901 ("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: 3c46901 ("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>
1 parent d00255b commit 5038f92

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

netlink.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,12 @@
5656
#define NLBUFSIZ 65536
5757

5858
/* Socket in init, in target namespace, sequence (just needs to be monotonic) */
59-
int nl_sock = -1;
60-
int nl_sock_ns = -1;
61-
static int nl_sock_neigh = -1;
62-
static int nl_seq = 1;
59+
int nl_sock = -1;
60+
int nl_sock_ns = -1;
61+
static int nl_seq = 1;
62+
63+
/* Socket for neighbour event notifier */
64+
static int nl_sock_neigh = -1;
6365

6466
/**
6567
* nl_sock_init_do() - Set up netlink sockets in init or target namespace

0 commit comments

Comments
 (0)