From: Amitay Isaacs Date: Thu, 8 Mar 2018 03:19:19 +0000 (+1100) Subject: ctdb-tools: Drop ipiface command from ctdb tool X-Git-Tag: talloc-2.1.12~234 X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=efe3a7279ee43d1bd774b7ca22ec14dc233b9c97;p=samba.git ctdb-tools: Drop ipiface command from ctdb tool This command is not used anywhere and also does not work for IPv6 addresses. Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- diff --git a/ctdb/doc/ctdb.1.xml b/ctdb/doc/ctdb.1.xml index 8dfca3b1a49..3103d62cc1f 100644 --- a/ctdb/doc/ctdb.1.xml +++ b/ctdb/doc/ctdb.1.xml @@ -1834,7 +1834,7 @@ HEALTH: NO-HEALTHY-NODES - ERROR - Backup of corrupted TDB in '/usr/local/var/li diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index 8535c784c93..fa8d880335a 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -5870,34 +5870,6 @@ static int control_reloadips(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, return ipreallocate(mem_ctx, ctdb); } -static int control_ipiface(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, - int argc, const char **argv) -{ - ctdb_sock_addr addr; - char *iface; - int ret; - - if (argc != 1) { - usage("ipiface"); - } - - ret = ctdb_sock_addr_from_string(argv[0], &addr, false); - if (ret != 0) { - fprintf(stderr, "Failed to Parse IP %s\n", argv[0]); - return 1; - } - - iface = ctdb_sys_find_ifname(&addr); - if (iface == NULL) { - fprintf(stderr, "Failed to find interface for IP %s\n", - argv[0]); - return 1; - } - free(iface); - - return 0; -} - static const struct ctdb_cmd { const char *name; @@ -6065,8 +6037,6 @@ static const struct ctdb_cmd { "show database statistics", "" }, { "reloadips", control_reloadips, false, false, "reload the public addresses file", "[all|]" }, - { "ipiface", control_ipiface, true, false, - "Find the interface an ip address is hosted on", "" }, }; static const struct ctdb_cmd *match_command(const char *command)