summaryrefslogtreecommitdiff
path: root/source3/utils/smbcontrol.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-09-29 12:17:05 +0200
committerVolker Lendecke <vl@samba.org>2010-09-30 14:30:33 +0200
commitbad98e37e7e4077a74c7b32d74499c78810192c5 (patch)
tree0b69670fc18170d7bc5e9ef0be6643c1ef595fa9 /source3/utils/smbcontrol.c
parent10f0c785c70b89e76f3a9cd3b319262affc9447e (diff)
downloadsamba-bad98e37e7e4077a74c7b32d74499c78810192c5.tar.gz
samba-bad98e37e7e4077a74c7b32d74499c78810192c5.tar.bz2
samba-bad98e37e7e4077a74c7b32d74499c78810192c5.zip
s3: Add "smbcontrol winbindd ip-dropped <local-ip>"
This is supposed to improve the winbind reconnect time after an ip address has been moved away from a box. Any kind of HA scenario will benefit from this, because winbindd does not have to wait for the TCP timeout to kick in when a local IP address has been dropped and DC replies are not received anymore.
Diffstat (limited to 'source3/utils/smbcontrol.c')
-rw-r--r--source3/utils/smbcontrol.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index e24add0050..998971dfa2 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -726,6 +726,22 @@ static bool do_closeshare(struct messaging_context *msg_ctx,
strlen(argv[1]) + 1);
}
+/* Tell winbindd an IP got dropped */
+
+static bool do_ip_dropped(struct messaging_context *msg_ctx,
+ const struct server_id pid,
+ const int argc, const char **argv)
+{
+ if (argc != 2) {
+ fprintf(stderr, "Usage: smbcontrol <dest> ip-dropped "
+ "<ip-address>\n");
+ return False;
+ }
+
+ return send_message(msg_ctx, pid, MSG_WINBIND_IP_DROPPED, argv[1],
+ strlen(argv[1]) + 1);
+}
+
/* force a blocking lock retry */
static bool do_lockretry(struct messaging_context *msg_ctx,
@@ -1196,6 +1212,7 @@ static const struct {
{ "debuglevel", do_debuglevel, "Display current debuglevels" },
{ "printnotify", do_printnotify, "Send a print notify message" },
{ "close-share", do_closeshare, "Forcibly disconnect a share" },
+ { "ip-dropped", do_ip_dropped, "Tell winbind that an IP got dropped" },
{ "lockretry", do_lockretry, "Force a blocking lock retry" },
{ "brl-revalidate", do_brl_revalidate, "Revalidate all brl entries" },
{ "samsync", do_samsync, "Initiate SAM synchronisation" },