diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-04-26 16:22:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-04-26 16:22:55 +0000 |
commit | caf1a5281f9e974ba73ceded3a782db3d0142c5f (patch) | |
tree | a09197b1fd2e984a0e8598e7007deb2a8e1969d7 /libnetdata/socket/socket.c | |
parent | Releasing debian version 1.14.0~rc0-1. (diff) | |
download | netdata-caf1a5281f9e974ba73ceded3a782db3d0142c5f.tar.xz netdata-caf1a5281f9e974ba73ceded3a782db3d0142c5f.zip |
Merging upstream version 1.14.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libnetdata/socket/socket.c')
-rw-r--r-- | libnetdata/socket/socket.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libnetdata/socket/socket.c b/libnetdata/socket/socket.c index 6b0b3b67..bf9c60ea 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'; |