]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: cli: displays sockpair@ in "show cli sockets"
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 26 Oct 2018 12:47:41 +0000 (14:47 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 28 Oct 2018 13:03:30 +0000 (14:03 +0100)
The 'show cli sockets' was not handling the sockpairs, it now displays
the fd of the socket and also show the unknown protocols.

src/cli.c

index f7fb6f0e7e4c8e2f2a099d5124eebb18427dd963..cc1f6813cbbe7ccfe381745da29bf0c4b6e58d3f 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -1068,8 +1068,10 @@ static int cli_io_handler_show_cli_sock(struct appctx *appctx)
                                                        addr_to_str(&l->addr, addr, sizeof(addr));
                                                        port_to_str(&l->addr, port, sizeof(port));
                                                        chunk_appendf(&trash, "[%s]:%s ", addr, port);
+                                               } else if (l->addr.ss_family == AF_CUST_SOCKPAIR) {
+                                                       chunk_appendf(&trash, "sockpair@%d ", ((struct sockaddr_in *)&l->addr)->sin_addr.s_addr);
                                                } else
-                                                       continue;
+                                                       chunk_appendf(&trash, "unknown ");
 
                                                if ((bind_conf->level & ACCESS_LVL_MASK) == ACCESS_LVL_ADMIN)
                                                        chunk_appendf(&trash, "admin ");