From owner-cvs-src-old@FreeBSD.ORG Mon Mar 21 08:55:24 2011 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAA4A10656E2 for ; Mon, 21 Mar 2011 08:55:24 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9B9DE8FC15 for ; Mon, 21 Mar 2011 08:55:24 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id p2L8tOmH089999 for ; Mon, 21 Mar 2011 08:55:24 GMT (envelope-from pjd@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p2L8tO8p089998 for cvs-src-old@freebsd.org; Mon, 21 Mar 2011 08:55:24 GMT (envelope-from pjd@repoman.freebsd.org) Message-Id: <201103210855.p2L8tO8p089998@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to pjd@repoman.freebsd.org using -f From: Pawel Jakub Dawidek Date: Mon, 21 Mar 2011 08:54:59 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sbin/hastd control.c hast.conf.5 hast.h hastd.c parse.y primary.c proto.c proto.h proto_impl.h proto_socketpair.c proto_tcp4.c proto_uds.c secondary.c token.l X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 08:55:24 -0000 pjd 2011-03-21 08:54:59 UTC FreeBSD src repository Modified files: sbin/hastd control.c hast.conf.5 hast.h hastd.c parse.y primary.c proto.c proto.h proto_impl.h proto_socketpair.c proto_tcp4.c proto_uds.c secondary.c token.l Log: SVN rev 219818 on 2011-03-21 08:54:59Z by pjd 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 Revision Changes Path 1.15 +2 -0 src/sbin/hastd/control.c 1.14 +13 -1 src/sbin/hastd/hast.conf.5 1.13 +2 -0 src/sbin/hastd/hast.h 1.44 +9 -1 src/sbin/hastd/hastd.c 1.11 +21 -1 src/sbin/hastd/parse.y 1.60 +21 -11 src/sbin/hastd/primary.c 1.12 +9 -7 src/sbin/hastd/proto.c 1.8 +2 -1 src/sbin/hastd/proto.h 1.7 +1 -1 src/sbin/hastd/proto_impl.h 1.8 +4 -2 src/sbin/hastd/proto_socketpair.c 1.14 +27 -6 src/sbin/hastd/proto_tcp4.c 1.12 +9 -2 src/sbin/hastd/proto_uds.c 1.28 +3 -3 src/sbin/hastd/secondary.c 1.6 +1 -0 src/sbin/hastd/token.l