diff options
| author | Amitay Isaacs <amitay@gmail.com> | 2014-02-11 18:07:08 +1100 |
|---|---|---|
| committer | Martin Schwenke <martins@samba.org> | 2014-03-04 03:01:38 +0100 |
| commit | fb2631f5dfd3ec58fd277dbe155afab58f882202 (patch) | |
| tree | 720fd8a31fd684fd1e5cd2e3f1f61070d65d55a5 | |
| parent | af3a168ed3b0dcac4086d2d90bfdef65590b68dc (diff) | |
| download | samba-fb2631f5dfd3ec58fd277dbe155afab58f882202.tar.gz samba-fb2631f5dfd3ec58fd277dbe155afab58f882202.tar.xz samba-fb2631f5dfd3ec58fd277dbe155afab58f882202.zip | |
ctdb-daemon: Do not support connection tracking if there are no public IPs
CTDB tracks connections to be able to send tickle ACKs and gratuitous
ARPs. When there are no public IPs, there is no need for tickle ACKs
and gratuitous ARPs.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue Mar 4 03:01:38 CET 2014 on sn-devel-104
| -rw-r--r-- | ctdb/server/ctdb_takeover.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c index fe4f472078..34b210ee24 100644 --- a/ctdb/server/ctdb_takeover.c +++ b/ctdb/server/ctdb_takeover.c @@ -2900,6 +2900,11 @@ int32_t ctdb_control_tcp_client(struct ctdb_context *ctdb, uint32_t client_id, struct ctdb_vnn *vnn; ctdb_sock_addr addr; + /* If we don't have public IPs, tickles are useless */ + if (ctdb->vnn == NULL) { + return 0; + } + switch (indata.dsize) { case sizeof(struct ctdb_control_tcp): old_addr = (struct ctdb_control_tcp *)indata.dptr; @@ -3044,6 +3049,11 @@ int32_t ctdb_control_tcp_add(struct ctdb_context *ctdb, TDB_DATA indata, bool tc struct ctdb_tcp_connection tcp; struct ctdb_vnn *vnn; + /* If we don't have public IPs, tickles are useless */ + if (ctdb->vnn == NULL) { + return 0; + } + vnn = find_public_ip_vnn(ctdb, &p->dst_addr); if (vnn == NULL) { DEBUG(DEBUG_INFO,(__location__ " got TCP_ADD control for an address which is not a public address '%s'\n", @@ -3181,6 +3191,11 @@ int32_t ctdb_control_tcp_remove(struct ctdb_context *ctdb, TDB_DATA indata) { struct ctdb_tcp_connection *conn = (struct ctdb_tcp_connection *)indata.dptr; + /* If we don't have public IPs, tickles are useless */ + if (ctdb->vnn == NULL) { + return 0; + } + ctdb_remove_tcp_connection(ctdb, conn); return 0; |
