samba_dnsupdate: Work around a bug in nsupdate
authorAndreas Schneider <asn@samba.org>
Tue, 25 Aug 2015 15:26:05 +0000 (17:26 +0200)
committerGarming Sam <garming@samba.org>
Thu, 16 Jun 2016 02:40:13 +0000 (04:40 +0200)
The doio_send() function of bind fails on a short write with sendmsg().

See https://bugzilla.redhat.com/show_bug.cgi?id=1250921

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/scripting/bin/samba_dnsupdate

index 4db783566976e2fd62f75c2305c6a0385e66b6e5..025664a18d9fabdb2b01af23b533885aeb940524 100755 (executable)
@@ -382,6 +382,9 @@ def call_nsupdate(d, op="add"):
     f.write("send\n")
     f.close()
 
+    # Set a bigger MTU size to work around a bug in nsupdate's doio_send()
+    os.environ["SOCKET_WRAPPER_MTU"] = "2000"
+
     global error_count
     if ccachename:
         os.environ["KRB5CCNAME"] = ccachename
@@ -410,6 +413,8 @@ def call_nsupdate(d, op="add"):
             print("Failed nsupdate: %s : %s" % (str(d), estr))
     os.unlink(tmpfile)
 
+    # Let socket_wrapper set the default MTU size
+    os.environ["SOCKET_WRAPPER_MTU"] = "0"
 
 
 def rodc_dns_update(d, t, op):