Here is my puzzledom.
I installed hb2.0.4 on my slackware 10. And it worked well.
But I found its master process bound to all my host's interface.
like:
netstat -npl | grep heartbeat
udp 0 0 172.30.31.75:695 0.0.0.0:*
29007/heartbeat: ma
udp 0 0 0.0.0.0:33906 0.0.0.0:*
29007/heartbeat: ma
Here is 'ip addr show':
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
link/ether 00:90:27:99:31:38 brd ff:ff:ff:ff:ff:ff
inet 172.30.31.75/24 brd 172.30.31.255 scope global eth0
3: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
link/ether 00:03:47:d5:a4:7d brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 100
link/ether 00:03:47:d5:a4:7e brd ff:ff:ff:ff:ff:ff
I used ucast to communicate with each node in my cluter for experiment purpose.
After some digging, I changed code in ucast.c "INADDR_ANY" to "172.30.31.75".
So it bound to eth0. But there was still exception(0.0.0.0:33906). and I
couldn't
control its port! I could't understand...
Yes, I had "grep -R '\<bind\>' *", but that appeared little help.
I had tried gdb to trace the bind call, but that appeared little help neither.
I knew if we called 'connect' on an unconnect sock of UDP, it would call bind
automaticly.
Bat after doing some greps and straces, I gave up.
The hosts which hb monitered, would be on internet in future, and if I couldn't
solved this
dilemma, that would be a big security hole on ouer machines. But all of us
wouldn't expect this.
So, I need your help.
Much Thanks!
Best wishes.
Richard cao
------------------------------
我现在使用Sogou.com的2G邮箱了,你也来试试吧!
http://mail.sogou.com/recommend/sogoumail_invite_reg1.jsp?from=sogouinvitation&s_EMAIL=csxnju%40sogou.com&username=linux-ha-dev&FullName=linux-ha-dev&Email=linux-ha-dev%40lists.linux-ha.org&verify=d36c1147ae65c0ef2d47c6ea29b371e2
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/