antirez/redis — pull request #1155 by hirose31 (2013-06-14 11:32:36+00:00)
Title: Call bind(2) before connect(2) if exists "bind ADDR" in redis.conf

Redis master recognizes slave's IP address by getpeername(2) so that address becomes an address assigned slave's eth0 even if IP aliased (eth0:1) in slave linux box and ```bind ``` in redis.conf and that address is not local address (127.0.0.0/8).

Could you give me any advice?

```
Redis master:
IP address:
eth0: 10.0.0.100

Redis slave:
IP address:
eth0: 10.0.0.200
eth0:1: 10.0.0.201
redis.conf:
bind 10.0.0.201

Redis sentinel:
IP address:
eth0: 10.0.0.50
sentinel.conf:
sentinel monitor mymaster 10.0.0.100 6379 1

$ redis-cli -h 10.0.0.201 slaveof 10.0.0.100 6379

$ redis-cli -h 10.0.0.100 info | grep slave
slave0:10.0.0.200,6379,online # not 10.0.0.201

$ redis-cli -h 10.0.0.50 sentinel slaves mymaster | grep -A1 ip
ip
10.0.0.200 # not 10.0.0.201

```