From caf1a5281f9e974ba73ceded3a782db3d0142c5f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 26 Apr 2019 18:22:55 +0200 Subject: Merging upstream version 1.14.0. Signed-off-by: Daniel Baumann --- libnetdata/socket/socket.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libnetdata/socket/socket.c') diff --git a/libnetdata/socket/socket.c b/libnetdata/socket/socket.c index 6b0b3b674..bf9c60ea1 100644 --- a/libnetdata/socket/socket.c +++ b/libnetdata/socket/socket.c @@ -944,6 +944,11 @@ int accept_socket(int fd, int flags, char *client_ip, size_t ipsize, char *clien strncpyz(client_port, "UNKNOWN", portsize - 1); } +#ifdef __FreeBSD__ + if(((struct sockaddr *)&sadr)->sa_family == AF_LOCAL) + strncpyz(client_ip, "localhost", ipsize); +#endif + client_ip[ipsize - 1] = '\0'; client_port[portsize - 1] = '\0'; -- cgit v1.2.3