csync2 icon indicating copy to clipboard operation
csync2 copied to clipboard

Using secondary IP address

Open liangxin1300 opened this issue 4 years ago • 0 comments

Hi @lge ,

I meet an environment,

On node1,

# ip a
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 52:54:00:e8:7f:24 brd ff:ff:ff:ff:ff:ff
    inet 10.10.10.121/24 brd 10.10.10.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet 10.10.10.191/24 brd 10.10.10.255 scope global secondary eth1
       valid_lft forever preferred_lft forever
# hostname
node1
# cat /etc/hosts
10.10.10.191 node1
10.10.10.192 node2
10.10.10.121 vnode1
10.10.10.122 vnode2

On node2,

# ip a
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 52:54:00:39:4a:c2 brd ff:ff:ff:ff:ff:ff
    inet 10.10.10.122/24 brd 10.10.10.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet 10.10.10.192/24 brd 10.10.10.255 scope global secondary eth1
       valid_lft forever preferred_lft forever
# hostname
node2
# cat /etc/hosts
10.10.10.191 node1
10.10.10.192 node2
10.10.10.121 vnode1
10.10.10.122 vnode2

Problem:

When verify_peername, node1 raise Identification failed!, since node2's address get from getaddrinfo is 10.10.10.192, while "peername" get from getpeername is 10.10.10.122(although node2 using 10.10.10.192 to connect with node1), so here is the difference to make verify_peername failed

Any suggestions about this?

Thank you!

liangxin1300 avatar Apr 22 '21 15:04 liangxin1300