summaryrefslogtreecommitdiff
path: root/src/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/socket.c')
-rw-r--r--src/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/socket.c b/src/socket.c
index e7f6a5125..cecbd4288 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -341,7 +341,7 @@ static int connSocketIsLocal(connection *conn) {
if (connSocketAddr(conn, cip, sizeof(cip) - 1, NULL, 1) == C_ERR)
return -1;
- return !strcmp(cip,"127.0.0.1") || !strcmp(cip,"::1");
+ return !strncmp(cip, "127.", 4) || !strcmp(cip, "::1");
}
static int connSocketListen(connListener *listener) {