diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-04-26 16:22:17 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-04-26 16:22:17 +0000 |
commit | 58b482856cf37b0519e516ab8dc1105ba958f8b2 (patch) | |
tree | 0c46396e98741dfae4ce907bc8ef8c54418b3753 /libnetdata/socket/socket.c | |
parent | Adding upstream version 1.14.0~rc0. (diff) | |
download | netdata-58b482856cf37b0519e516ab8dc1105ba958f8b2.tar.xz netdata-58b482856cf37b0519e516ab8dc1105ba958f8b2.zip |
Adding upstream version 1.14.0.upstream/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'; |