summaryrefslogtreecommitdiffstats
path: root/sbin/hastd/secondary.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2011-03-21 08:54:59 +0000
committerpjd <pjd@FreeBSD.org>2011-03-21 08:54:59 +0000
commit3420a736119b646db3defc2c3e24d534e35d73a0 (patch)
treec174097a26c9fb50392210eb339837c6cf4e95d9 /sbin/hastd/secondary.c
parentee6f63ce1774533a3602145d9627d54d14d70769 (diff)
downloadFreeBSD-src-3420a736119b646db3defc2c3e24d534e35d73a0.zip
FreeBSD-src-3420a736119b646db3defc2c3e24d534e35d73a0.tar.gz
In hast.conf we define the other node's address in 'remote' variable.
This way we know how to connect to secondary node when we are primary. The same variable is used by the secondary node - it only accepts connections from the address stored in 'remote' variable. In cluster configurations it is common that each node has its individual IP address and there is one addtional shared IP address which is assigned to primary node. It seems it is possible that if the shared IP address is from the same network as the individual IP address it might be choosen by the kernel as a source address for connection with the secondary node. Such connection will be rejected by secondary, as it doesn't come from primary node individual IP. Add 'source' variable that allows to specify source IP address we want to bind to before connecting to the secondary node. MFC after: 1 week
Diffstat (limited to 'sbin/hastd/secondary.c')
-rw-r--r--sbin/hastd/secondary.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/hastd/secondary.c b/sbin/hastd/secondary.c
index 218c802..e718b2c 100644
--- a/sbin/hastd/secondary.c
+++ b/sbin/hastd/secondary.c
@@ -351,7 +351,7 @@ hastd_secondary(struct hast_resource *res, struct nv *nvin)
/*
* Create communication channel between parent and child.
*/
- if (proto_client("socketpair://", &res->hr_ctrl) < 0) {
+ if (proto_client(NULL, "socketpair://", &res->hr_ctrl) < 0) {
KEEP_ERRNO((void)pidfile_remove(pfh));
pjdlog_exit(EX_OSERR,
"Unable to create control sockets between parent and child");
@@ -359,7 +359,7 @@ hastd_secondary(struct hast_resource *res, struct nv *nvin)
/*
* Create communication channel between child and parent.
*/
- if (proto_client("socketpair://", &res->hr_event) < 0) {
+ if (proto_client(NULL, "socketpair://", &res->hr_event) < 0) {
KEEP_ERRNO((void)pidfile_remove(pfh));
pjdlog_exit(EX_OSERR,
"Unable to create event sockets between child and parent");
@@ -368,7 +368,7 @@ hastd_secondary(struct hast_resource *res, struct nv *nvin)
* Create communication channel for sending connection requests from
* parent to child.
*/
- if (proto_client("socketpair://", &res->hr_conn) < 0) {
+ if (proto_client(NULL, "socketpair://", &res->hr_conn) < 0) {
/* TODO: There's no need for this to be fatal error. */
KEEP_ERRNO((void)pidfile_remove(pfh));
pjdlog_exit(EX_OSERR,
OpenPOWER on IntegriCloud