Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
442b06db
Commit
442b06db
authored
Mar 10, 2014
by
Salvatore Sanfilippo
Browse files
Merge pull request #1555 from mattsta/cluster-port-error-out
Cluster port error out
parents
ed8c5523
ce68caea
Changes
2
Show whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
442b06db
...
...
@@ -329,6 +329,19 @@ void clusterInit(void) {
/* We need a listening TCP port for our cluster messaging needs. */
server.cfd_count = 0;
/* Port sanity check II
The other handshake port check is triggered too late to stop
us from trying to use a too-high cluster port number.
*/
if (server.port > (65535-REDIS_CLUSTER_PORT_INCR)) {
redisLog(REDIS_WARNING, "Redis port number too high. "
"Cluster communication port is 10,000 port "
"numbers higher than your Redis port. "
"Your Redis port number must be "
"lower than 55535.");
}
if (listenToPort(server.port+REDIS_CLUSTER_PORT_INCR,
server.cfd,&server.cfd_count) == REDIS_ERR)
{
...
...
src/redis.c
View file @
442b06db
...
...
@@ -1582,7 +1582,7 @@ int listenToPort(int port, int *fds, int *count) {
redisLog(REDIS_WARNING,
"Creating Server TCP listening socket %s:%d: %s",
server.bindaddr[j] ? server.bindaddr[j] : "*",
server.
port, server.neterr);
port, server.neterr);
return REDIS_ERR;
}
(*count)++;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment