[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Mon May 11 20:23:05 MDT 2015
The branch, master has been updated
via bc62dfa Convert all uint32/16/8 to _t in a couple of include files.
via f893a4a Convert all uses of uint32/16/8 to _t in source3/passdb.
via 1dd9d13 Convert all (remaining) uses of uint32/16/8 to _t in source3/printing.
via ddcf056 Convert all uses of uint32/16/8 to _t in source3/registry.
via a685404 Convert all uses of uint32/16/8 to _t in source3/rpc_server.
via 8bcdd67 Convert all uses of uint32/16/8 to _t in source3/rpc_client.
via 1ef68eb Convert all uint32/16/8 to _t in source3/rpcclient.
via 1e77678 Convert all uses of uint32/16/8 to _t in source3/torture.
via 250df86 Change all uses of uint32 to uint32_t in vfs.h. This is part of a general cleanup if people approve. This time around get both vfs.h and vfs.c and all instances of uint8, uint16 and uint32.
via 9b68654 ctdb-daemon: Remove obsolete IPv4 only controls
via 4f4e6eb ctdb-daemon: Remove older data structure that supports only IPv4 addresses
from c75f297 ctdb-daemon: Fix typo in debug message
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit bc62dfa493df8a554829900d6bd9686f0ca028b5
Author: Richard Sharpe <rsharpe at samba.org>
Date: Sat May 9 15:35:21 2015 -0700
Convert all uint32/16/8 to _t in a couple of include files.
Signed-off-by: Richard Sharpe <rsharpe at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Tue May 12 04:22:55 CEST 2015 on sn-devel-104
commit f893a4a3547788eaf992d9f04ba380563b063971
Author: Richard Sharpe <rsharpe at samba.org>
Date: Sat May 9 13:34:31 2015 -0700
Convert all uses of uint32/16/8 to _t in source3/passdb.
Signed-off-by: Richard Sharpe <rsharpe at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 1dd9d13e214a631346f014b36c3f0c7deb10606f
Author: Richard Sharpe <rsharpe at samba.org>
Date: Sat May 9 12:33:40 2015 -0700
Convert all (remaining) uses of uint32/16/8 to _t in source3/printing.
Signed-off-by: Richard Sharpe <rsharpe at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit ddcf0565bb8aedb3d53431cc58395c1c74d50dcc
Author: Richard Sharpe <rsharpe at samba.org>
Date: Sat May 9 12:19:46 2015 -0700
Convert all uses of uint32/16/8 to _t in source3/registry.
Signed-off-by: Richard Sharpe <rsharpe at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit a685404dce06d0f227f24b745629b0d0b46b925a
Author: Richard Sharpe <rsharpe at samba.org>
Date: Sat May 9 10:02:05 2015 -0700
Convert all uses of uint32/16/8 to _t in source3/rpc_server.
Signed-off-by: Richard Sharpe <rsharpe at gmail.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 8bcdd677ce616c636c81c0fa6f077c56dc269707
Author: Richard Sharpe <rsharpe at samba.org>
Date: Sat May 9 09:49:04 2015 -0700
Convert all uses of uint32/16/8 to _t in source3/rpc_client.
Signed-off-by: Richard Sharpe <rsharpe at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 1ef68eb6809fb4fd6d4981a302a86644a6ee0313
Author: Richard Sharpe <rsharpe at samba.org>
Date: Sat May 9 07:33:08 2015 -0700
Convert all uint32/16/8 to _t in source3/rpcclient.
Signed-off-by: Richard Sharpe <rsharpe at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 1e776786488f7fb2b26af45bdabc6d41579725ac
Author: Richard Sharpe <rsharpe at samba.org>
Date: Fri May 8 20:10:12 2015 -0700
Convert all uses of uint32/16/8 to _t in source3/torture.
Signed-off-by: Richard Sharpe <rsharpe at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 250df86ac01c00e2c8ae7053f1c11f384192672c
Author: Richard Sharpe <rsharpe at samba.org>
Date: Mon Apr 13 16:56:09 2015 -0700
Change all uses of uint32 to uint32_t in vfs.h. This is part of a general cleanup if people approve. This time around get both vfs.h and vfs.c and all instances of uint8, uint16 and uint32.
Signed-off-by: Richard Sharpe <rsharpe at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 9b6865475ed1a88885975f07c5848bfe003c7f5c
Author: Amitay Isaacs <amitay at gmail.com>
Date: Mon Mar 23 17:06:31 2015 +1100
ctdb-daemon: Remove obsolete IPv4 only controls
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 4f4e6ebace8ece37a90b08110a74b1a73030b28a
Author: Amitay Isaacs <amitay at gmail.com>
Date: Mon Mar 23 17:32:34 2015 +1100
ctdb-daemon: Remove older data structure that supports only IPv4 addresses
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
Summary of changes:
ctdb/client/ctdb_client.c | 147 ++++---------------------
ctdb/include/ctdb_client.h | 11 --
ctdb/include/ctdb_private.h | 31 +-----
ctdb/server/ctdb_control.c | 15 ++-
ctdb/server/ctdb_recover.c | 31 ------
ctdb/server/ctdb_takeover.c | 170 ++++-------------------------
source3/include/vfs.h | 46 ++++----
source3/lib/ctdbd_conn.c | 14 +--
source3/nmbd/nmbd_proto.h | 2 +-
source3/passdb/account_pol.c | 18 +--
source3/passdb/login_cache.c | 2 +-
source3/passdb/lookup_sid.c | 12 +-
source3/passdb/pdb_compat.c | 12 +-
source3/passdb/pdb_get_set.c | 24 ++--
source3/passdb/pdb_interface.c | 2 +-
source3/passdb/pdb_ldap.c | 12 +-
source3/passdb/pdb_ldap_util.c | 4 +-
source3/passdb/pdb_samba_dsdb.c | 26 ++---
source3/passdb/pdb_secrets.c | 4 +-
source3/passdb/pdb_secrets.h | 2 +-
source3/passdb/pdb_smbpasswd.c | 4 +-
source3/passdb/pdb_tdb.c | 30 ++---
source3/passdb/pdb_wbc_sam.c | 8 +-
source3/passdb/secrets.c | 4 +-
source3/printing/notify.c | 2 +-
source3/printing/notify.h | 28 ++---
source3/printing/nt_printing.c | 2 +-
source3/printing/print_cups.c | 2 +-
source3/printing/printing.c | 62 +++++------
source3/printing/printspoolss.c | 2 +-
source3/registry/reg_backend_db.c | 16 +--
source3/registry/reg_backend_hkpt_params.c | 4 +-
source3/registry/reg_backend_shares.c | 2 +-
source3/registry/reg_parse_prs.c | 8 +-
source3/registry/reg_parse_prs.h | 4 +-
source3/registry/reg_perfcount.c | 18 +--
source3/registry/regfio.c | 22 ++--
source3/registry/regfio.h | 10 +-
source3/rpc_client/cli_lsarpc.c | 4 +-
source3/rpc_client/cli_lsarpc.h | 4 +-
source3/rpc_client/cli_netlogon.c | 4 +-
source3/rpc_client/cli_netlogon.h | 2 +-
source3/rpc_client/cli_pipe.c | 14 +--
source3/rpc_client/rpc_client.h | 4 +-
source3/rpc_server/rpc_handles.c | 6 +-
source3/rpc_server/srv_access_check.c | 6 +-
source3/rpc_server/srv_access_check.h | 4 +-
source3/rpc_server/srv_pipe.c | 4 +-
source3/rpcclient/cmd_dfs.c | 10 +-
source3/rpcclient/cmd_echo.c | 8 +-
source3/rpcclient/cmd_lsarpc.c | 32 +++---
source3/rpcclient/cmd_netlogon.c | 4 +-
source3/rpcclient/cmd_samr.c | 88 +++++++--------
source3/rpcclient/cmd_shutdown.c | 2 +-
source3/rpcclient/cmd_spoolss.c | 2 +-
source3/rpcclient/cmd_srvsvc.c | 18 +--
source3/services/services.h | 4 +-
source3/smbd/vfs.c | 14 +--
source3/torture/cmd_vfs.c | 2 +-
source3/torture/mangle_test.c | 2 +-
source3/torture/msgtest.c | 4 +-
source3/torture/nbio.c | 2 +-
source3/torture/pdbtest.c | 20 ++--
source3/torture/torture.c | 74 ++++++-------
source3/torture/utable.c | 2 +-
65 files changed, 423 insertions(+), 730 deletions(-)
Changeset truncated at 500 lines:
diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c
index 7526362..5bf3a68 100644
--- a/ctdb/client/ctdb_client.c
+++ b/ctdb/client/ctdb_client.c
@@ -1522,13 +1522,9 @@ int ctdb_ctrl_getnodemap(struct ctdb_context *ctdb,
TDB_DATA outdata;
int32_t res;
- ret = ctdb_control(ctdb, destnode, 0,
- CTDB_CONTROL_GET_NODEMAP, 0, tdb_null,
+ ret = ctdb_control(ctdb, destnode, 0,
+ CTDB_CONTROL_GET_NODEMAP, 0, tdb_null,
mem_ctx, &outdata, &res, &timeout, NULL);
- if (ret == 0 && res == -1 && outdata.dsize == 0) {
- DEBUG(DEBUG_ERR,(__location__ " ctdb_control for getnodes failed, falling back to ipv4-only control\n"));
- return ctdb_ctrl_getnodemapv4(ctdb, timeout, destnode, mem_ctx, nodemap);
- }
if (ret != 0 || res != 0 || outdata.dsize == 0) {
DEBUG(DEBUG_ERR,(__location__ " ctdb_control for getnodes failed ret:%d res:%d\n", ret, res));
return -1;
@@ -1536,7 +1532,6 @@ int ctdb_ctrl_getnodemap(struct ctdb_context *ctdb,
*nodemap = (struct ctdb_node_map *)talloc_memdup(mem_ctx, outdata.dptr, outdata.dsize);
talloc_free(outdata.dptr);
-
return 0;
}
@@ -1566,45 +1561,6 @@ int ctdb_ctrl_getnodesfile(struct ctdb_context *ctdb,
}
/*
- old style ipv4-only get a list of nodes (vnn and flags ) from a remote node
- */
-int ctdb_ctrl_getnodemapv4(struct ctdb_context *ctdb,
- struct timeval timeout, uint32_t destnode,
- TALLOC_CTX *mem_ctx, struct ctdb_node_map **nodemap)
-{
- int ret, i, len;
- TDB_DATA outdata;
- struct ctdb_node_mapv4 *nodemapv4;
- int32_t res;
-
- ret = ctdb_control(ctdb, destnode, 0,
- CTDB_CONTROL_GET_NODEMAPv4, 0, tdb_null,
- mem_ctx, &outdata, &res, &timeout, NULL);
- if (ret != 0 || res != 0 || outdata.dsize == 0) {
- DEBUG(DEBUG_ERR,(__location__ " ctdb_control for getnodesv4 failed ret:%d res:%d\n", ret, res));
- return -1;
- }
-
- nodemapv4 = (struct ctdb_node_mapv4 *)outdata.dptr;
-
- len = offsetof(struct ctdb_node_map, nodes) + nodemapv4->num*sizeof(struct ctdb_node_and_flags);
- (*nodemap) = talloc_zero_size(mem_ctx, len);
- CTDB_NO_MEMORY(ctdb, (*nodemap));
-
- (*nodemap)->num = nodemapv4->num;
- for (i=0; i<nodemapv4->num; i++) {
- (*nodemap)->nodes[i].pnn = nodemapv4->nodes[i].pnn;
- (*nodemap)->nodes[i].flags = nodemapv4->nodes[i].flags;
- (*nodemap)->nodes[i].addr.ip = nodemapv4->nodes[i].sin;
- (*nodemap)->nodes[i].addr.sa.sa_family = AF_INET;
- }
-
- talloc_free(outdata.dptr);
-
- return 0;
-}
-
-/*
drop the transport, reload the nodes file and restart the transport
*/
int ctdb_ctrl_reload_nodes_file(struct ctdb_context *ctdb,
@@ -2620,77 +2576,51 @@ int ctdb_ctrl_disable_monmode(struct ctdb_context *ctdb, struct timeval timeout,
-/*
+/*
sent to a node to make it take over an ip address
*/
-int ctdb_ctrl_takeover_ip(struct ctdb_context *ctdb, struct timeval timeout,
+int ctdb_ctrl_takeover_ip(struct ctdb_context *ctdb, struct timeval timeout,
uint32_t destnode, struct ctdb_public_ip *ip)
{
TDB_DATA data;
- struct ctdb_public_ipv4 ipv4;
int ret;
int32_t res;
- if (ip->addr.sa.sa_family == AF_INET) {
- ipv4.pnn = ip->pnn;
- ipv4.sin = ip->addr.ip;
-
- data.dsize = sizeof(ipv4);
- data.dptr = (uint8_t *)&ipv4;
-
- ret = ctdb_control(ctdb, destnode, 0, CTDB_CONTROL_TAKEOVER_IPv4, 0, data, NULL,
- NULL, &res, &timeout, NULL);
- } else {
- data.dsize = sizeof(*ip);
- data.dptr = (uint8_t *)ip;
-
- ret = ctdb_control(ctdb, destnode, 0, CTDB_CONTROL_TAKEOVER_IP, 0, data, NULL,
- NULL, &res, &timeout, NULL);
- }
+ data.dsize = sizeof(*ip);
+ data.dptr = (uint8_t *)ip;
+ ret = ctdb_control(ctdb, destnode, 0, CTDB_CONTROL_TAKEOVER_IP, 0,
+ data, NULL, NULL, &res, &timeout, NULL);
if (ret != 0 || res != 0) {
DEBUG(DEBUG_ERR,(__location__ " ctdb_control for takeover_ip failed\n"));
return -1;
}
- return 0;
+ return 0;
}
-/*
+/*
sent to a node to make it release an ip address
*/
-int ctdb_ctrl_release_ip(struct ctdb_context *ctdb, struct timeval timeout,
+int ctdb_ctrl_release_ip(struct ctdb_context *ctdb, struct timeval timeout,
uint32_t destnode, struct ctdb_public_ip *ip)
{
TDB_DATA data;
- struct ctdb_public_ipv4 ipv4;
int ret;
int32_t res;
- if (ip->addr.sa.sa_family == AF_INET) {
- ipv4.pnn = ip->pnn;
- ipv4.sin = ip->addr.ip;
-
- data.dsize = sizeof(ipv4);
- data.dptr = (uint8_t *)&ipv4;
-
- ret = ctdb_control(ctdb, destnode, 0, CTDB_CONTROL_RELEASE_IPv4, 0, data, NULL,
- NULL, &res, &timeout, NULL);
- } else {
- data.dsize = sizeof(*ip);
- data.dptr = (uint8_t *)ip;
-
- ret = ctdb_control(ctdb, destnode, 0, CTDB_CONTROL_RELEASE_IP, 0, data, NULL,
- NULL, &res, &timeout, NULL);
- }
+ data.dsize = sizeof(*ip);
+ data.dptr = (uint8_t *)ip;
+ ret = ctdb_control(ctdb, destnode, 0, CTDB_CONTROL_RELEASE_IP, 0,
+ data, NULL, NULL, &res, &timeout, NULL);
if (ret != 0 || res != 0) {
DEBUG(DEBUG_ERR,(__location__ " ctdb_control for release_ip failed\n"));
return -1;
}
- return 0;
+ return 0;
}
@@ -2830,21 +2760,19 @@ int ctdb_ctrl_get_public_ips_flags(struct ctdb_context *ctdb,
TDB_DATA outdata;
int32_t res;
- ret = ctdb_control(ctdb, destnode, 0,
+ ret = ctdb_control(ctdb, destnode, 0,
CTDB_CONTROL_GET_PUBLIC_IPS, flags, tdb_null,
mem_ctx, &outdata, &res, &timeout, NULL);
- if (ret == 0 && res == -1) {
- DEBUG(DEBUG_ERR,(__location__ " ctdb_control to get public ips failed, falling back to ipv4-only version\n"));
- return ctdb_ctrl_get_public_ipsv4(ctdb, timeout, destnode, mem_ctx, ips);
- }
if (ret != 0 || res != 0) {
- DEBUG(DEBUG_ERR,(__location__ " ctdb_control for getpublicips failed ret:%d res:%d\n", ret, res));
+ DEBUG(DEBUG_ERR,(__location__
+ " ctdb_control for getpublicips failed ret:%d res:%d\n",
+ ret, res));
return -1;
}
*ips = (struct ctdb_all_public_ips *)talloc_memdup(mem_ctx, outdata.dptr, outdata.dsize);
talloc_free(outdata.dptr);
-
+
return 0;
}
@@ -2858,39 +2786,6 @@ int ctdb_ctrl_get_public_ips(struct ctdb_context *ctdb,
0, ips);
}
-int ctdb_ctrl_get_public_ipsv4(struct ctdb_context *ctdb,
- struct timeval timeout, uint32_t destnode,
- TALLOC_CTX *mem_ctx, struct ctdb_all_public_ips **ips)
-{
- int ret, i, len;
- TDB_DATA outdata;
- int32_t res;
- struct ctdb_all_public_ipsv4 *ipsv4;
-
- ret = ctdb_control(ctdb, destnode, 0,
- CTDB_CONTROL_GET_PUBLIC_IPSv4, 0, tdb_null,
- mem_ctx, &outdata, &res, &timeout, NULL);
- if (ret != 0 || res != 0) {
- DEBUG(DEBUG_ERR,(__location__ " ctdb_control for getpublicips failed\n"));
- return -1;
- }
-
- ipsv4 = (struct ctdb_all_public_ipsv4 *)outdata.dptr;
- len = offsetof(struct ctdb_all_public_ips, ips) +
- ipsv4->num*sizeof(struct ctdb_public_ip);
- *ips = talloc_zero_size(mem_ctx, len);
- CTDB_NO_MEMORY(ctdb, *ips);
- (*ips)->num = ipsv4->num;
- for (i=0; i<ipsv4->num; i++) {
- (*ips)->ips[i].pnn = ipsv4->ips[i].pnn;
- (*ips)->ips[i].addr.ip = ipsv4->ips[i].sin;
- }
-
- talloc_free(outdata.dptr);
-
- return 0;
-}
-
int ctdb_ctrl_get_public_ip_info(struct ctdb_context *ctdb,
struct timeval timeout, uint32_t destnode,
TALLOC_CTX *mem_ctx,
diff --git a/ctdb/include/ctdb_client.h b/ctdb/include/ctdb_client.h
index 57f4917..0a61afc 100644
--- a/ctdb/include/ctdb_client.h
+++ b/ctdb/include/ctdb_client.h
@@ -470,17 +470,6 @@ struct ctdb_uptime {
struct timeval last_recovery_finished;
};
-/*
- struct for tcp_client control
- this is an ipv4 only version of this structure used by samba
- samba will later be migrated over to use the
- ctdb_control_tcp_addr structure instead
- */
-struct ctdb_control_tcp {
- struct sockaddr_in src; /* samba uses this */
- struct sockaddr_in dest; /* samba uses this */
-};
-/* new style structure */
struct ctdb_control_tcp_addr {
ctdb_sock_addr src;
ctdb_sock_addr dest;
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h
index 3391560..f34b5f2 100644
--- a/ctdb/include/ctdb_private.h
+++ b/ctdb/include/ctdb_private.h
@@ -974,17 +974,6 @@ struct ctdb_control_list_tunable {
};
-struct ctdb_node_and_flagsv4 {
- uint32_t pnn;
- uint32_t flags;
- struct sockaddr_in sin;
-};
-
-struct ctdb_node_mapv4 {
- uint32_t num;
- struct ctdb_node_and_flagsv4 nodes[1];
-};
-
struct ctdb_control_wipe_database {
uint32_t db_id;
uint32_t transaction_id;
@@ -1111,24 +1100,15 @@ int32_t ctdb_control_end_recovery(struct ctdb_context *ctdb,
struct ctdb_req_control *c,
bool *async_reply);
-struct ctdb_public_ipv4 {
- uint32_t pnn;
- struct sockaddr_in sin;
-};
-
int ctdb_ctrl_takeover_ip(struct ctdb_context *ctdb, struct timeval timeout,
uint32_t destnode, struct ctdb_public_ip *ip);
int ctdb_ctrl_release_ip(struct ctdb_context *ctdb, struct timeval timeout,
uint32_t destnode, struct ctdb_public_ip *ip);
-struct ctdb_all_public_ipsv4 {
- uint32_t num;
- struct ctdb_public_ipv4 ips[1];
-};
-
-int32_t ctdb_control_get_public_ipsv4(struct ctdb_context *ctdb, struct ctdb_req_control *c, TDB_DATA *outdata);
-int32_t ctdb_control_get_public_ips(struct ctdb_context *ctdb, struct ctdb_req_control *c, TDB_DATA *outdata);
-int ctdb_ctrl_get_public_ips(struct ctdb_context *ctdb,
+int32_t ctdb_control_get_public_ips(struct ctdb_context *ctdb,
+ struct ctdb_req_control *c,
+ TDB_DATA *outdata);
+int ctdb_ctrl_get_public_ips(struct ctdb_context *ctdb,
struct timeval timeout,
uint32_t destnode,
TALLOC_CTX *mem_ctx,
@@ -1139,9 +1119,6 @@ int ctdb_ctrl_get_public_ips_flags(struct ctdb_context *ctdb,
TALLOC_CTX *mem_ctx,
uint32_t flags,
struct ctdb_all_public_ips **ips);
-int ctdb_ctrl_get_public_ipsv4(struct ctdb_context *ctdb,
- struct timeval timeout, uint32_t destnode,
- TALLOC_CTX *mem_ctx, struct ctdb_all_public_ips **ips);
struct ctdb_control_iface_info {
char name[CTDB_IFACE_SIZE+2];
diff --git a/ctdb/server/ctdb_control.c b/ctdb/server/ctdb_control.c
index dafdc42..9069087 100644
--- a/ctdb/server/ctdb_control.c
+++ b/ctdb/server/ctdb_control.c
@@ -164,7 +164,7 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb,
return ctdb_control_getdbmap(ctdb, opcode, indata, outdata);
case CTDB_CONTROL_GET_NODEMAPv4:
- return ctdb_control_getnodemapv4(ctdb, opcode, indata, outdata);
+ return control_not_implemented("GET_NODEMAPv4", "GET_NODEMAP");
case CTDB_CONTROL_GET_NODEMAP:
return ctdb_control_getnodemap(ctdb, opcode, indata, outdata);
@@ -351,16 +351,14 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb,
return 0;
case CTDB_CONTROL_TAKEOVER_IPv4:
- CHECK_CONTROL_DATA_SIZE(sizeof(struct ctdb_public_ipv4));
- return ctdb_control_takeover_ipv4(ctdb, c, indata, async_reply);
+ return control_not_implemented("TAKEOVER_IPv4", "TAKEOVER_IP");
case CTDB_CONTROL_TAKEOVER_IP:
CHECK_CONTROL_DATA_SIZE(sizeof(struct ctdb_public_ip));
return ctdb_control_takeover_ip(ctdb, c, indata, async_reply);
case CTDB_CONTROL_RELEASE_IPv4:
- CHECK_CONTROL_DATA_SIZE(sizeof(struct ctdb_public_ipv4));
- return ctdb_control_release_ipv4(ctdb, c, indata, async_reply);
+ return control_not_implemented("RELEASE_IPv4", "RELEASE_IP");
case CTDB_CONTROL_RELEASE_IP:
CHECK_CONTROL_DATA_SIZE(sizeof(struct ctdb_public_ip));
@@ -371,14 +369,15 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb,
return ctdb_control_ipreallocated(ctdb, c, async_reply);
case CTDB_CONTROL_GET_PUBLIC_IPSv4:
- CHECK_CONTROL_DATA_SIZE(0);
- return ctdb_control_get_public_ipsv4(ctdb, c, outdata);
+ return control_not_implemented("GET_PUBLIC_IPSv4",
+ "GET_PUBLIC_IPS");
case CTDB_CONTROL_GET_PUBLIC_IPS:
CHECK_CONTROL_DATA_SIZE(0);
return ctdb_control_get_public_ips(ctdb, c, outdata);
- case CTDB_CONTROL_TCP_CLIENT:
+ case CTDB_CONTROL_TCP_CLIENT:
+ CHECK_CONTROL_DATA_SIZE(sizeof(struct ctdb_control_tcp_addr));
return ctdb_control_tcp_client(ctdb, client_id, indata);
case CTDB_CONTROL_STARTUP:
diff --git a/ctdb/server/ctdb_recover.c b/ctdb/server/ctdb_recover.c
index 427d985..23f793b 100644
--- a/ctdb/server/ctdb_recover.c
+++ b/ctdb/server/ctdb_recover.c
@@ -136,37 +136,6 @@ ctdb_control_getnodemap(struct ctdb_context *ctdb, uint32_t opcode, TDB_DATA ind
}
/*
- get an old style ipv4-only nodemap
-*/
-int
-ctdb_control_getnodemapv4(struct ctdb_context *ctdb, uint32_t opcode, TDB_DATA indata, TDB_DATA *outdata)
-{
- uint32_t i, num_nodes;
- struct ctdb_node_mapv4 *node_map;
-
- CHECK_CONTROL_DATA_SIZE(0);
-
- num_nodes = ctdb->num_nodes;
-
- outdata->dsize = offsetof(struct ctdb_node_mapv4, nodes) + num_nodes*sizeof(struct ctdb_node_and_flagsv4);
- outdata->dptr = (unsigned char *)talloc_zero_size(outdata, outdata->dsize);
- if (!outdata->dptr) {
- DEBUG(DEBUG_ALERT, (__location__ " Failed to allocate nodemap array\n"));
- exit(1);
- }
-
- node_map = (struct ctdb_node_mapv4 *)outdata->dptr;
- node_map->num = num_nodes;
- for (i=0; i<num_nodes; i++) {
- node_map->nodes[i].sin = ctdb->nodes[i]->address.ip;
- node_map->nodes[i].pnn = ctdb->nodes[i]->pnn;
- node_map->nodes[i].flags = ctdb->nodes[i]->flags;
- }
-
- return 0;
-}
-
-/*
reload the nodes file
*/
int
diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c
index 556b247..b09abd3 100644
--- a/ctdb/server/ctdb_takeover.c
+++ b/ctdb/server/ctdb_takeover.c
@@ -814,24 +814,6 @@ int32_t ctdb_control_takeover_ip(struct ctdb_context *ctdb,
}
/*
- takeover an ip address old v4 style
- */
-int32_t ctdb_control_takeover_ipv4(struct ctdb_context *ctdb,
- struct ctdb_req_control *c,
- TDB_DATA indata,
- bool *async_reply)
-{
- TDB_DATA data;
-
- data.dsize = sizeof(struct ctdb_public_ip);
- data.dptr = (uint8_t *)talloc_zero(c, struct ctdb_public_ip);
- CTDB_NO_MEMORY(ctdb, data.dptr);
-
- memcpy(data.dptr, indata.dptr, indata.dsize);
- return ctdb_control_takeover_ip(ctdb, c, data, async_reply);
-}
-
-/*
kill any clients that are registered with a IP that is being released
*/
static void release_kill_clients(struct ctdb_context *ctdb, ctdb_sock_addr *addr)
@@ -1049,25 +1031,6 @@ int32_t ctdb_control_release_ip(struct ctdb_context *ctdb,
return 0;
}
-/*
- release an ip address old v4 style
- */
-int32_t ctdb_control_release_ipv4(struct ctdb_context *ctdb,
- struct ctdb_req_control *c,
- TDB_DATA indata,
- bool *async_reply)
-{
- TDB_DATA data;
-
- data.dsize = sizeof(struct ctdb_public_ip);
- data.dptr = (uint8_t *)talloc_zero(c, struct ctdb_public_ip);
- CTDB_NO_MEMORY(ctdb, data.dptr);
-
- memcpy(data.dptr, indata.dptr, indata.dsize);
- return ctdb_control_release_ip(ctdb, c, data, async_reply);
-}
-
-
static int ctdb_add_public_address(struct ctdb_context *ctdb,
ctdb_sock_addr *addr,
unsigned mask, const char *ifaces,
@@ -2609,7 +2572,6 @@ int ctdb_takeover_run(struct ctdb_context *ctdb, struct ctdb_node_map *nodemap,
{
int i, j, ret;
struct ctdb_public_ip ip;
- struct ctdb_public_ipv4 ipv4;
uint32_t *nodes;
struct ctdb_public_ip_list *all_ips, *tmp_ip;
TDB_DATA data;
@@ -2695,36 +2657,22 @@ int ctdb_takeover_run(struct ctdb_context *ctdb, struct ctdb_node_map *nodemap,
*/
continue;
}
- if (tmp_ip->addr.sa.sa_family == AF_INET) {
- ipv4.pnn = tmp_ip->pnn;
- ipv4.sin = tmp_ip->addr.ip;
-
- timeout = TAKEOVER_TIMEOUT();
- data.dsize = sizeof(ipv4);
- data.dptr = (uint8_t *)&ipv4;
- state = ctdb_control_send(ctdb, nodemap->nodes[i].pnn,
- 0, CTDB_CONTROL_RELEASE_IPv4, 0,
- data, async_data,
- &timeout, NULL);
- } else {
- ip.pnn = tmp_ip->pnn;
- ip.addr = tmp_ip->addr;
-
- timeout = TAKEOVER_TIMEOUT();
- data.dsize = sizeof(ip);
- data.dptr = (uint8_t *)&ip;
- state = ctdb_control_send(ctdb, nodemap->nodes[i].pnn,
- 0, CTDB_CONTROL_RELEASE_IP, 0,
- data, async_data,
- &timeout, NULL);
- }
+ ip.pnn = tmp_ip->pnn;
--
Samba Shared Repository
More information about the samba-cvs
mailing list