Fix local clients detection (#11664)
Match 127.0.0.0/8 instead of just `127.0.0.1` to detect the local clients.
This commit is contained in:
parent
aee8d1ff28
commit
e1da724117
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user