]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix #596: Bail out of unbound-control list_local_zones when ssl
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 15 Jul 2014 14:42:57 +0000 (14:42 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 15 Jul 2014 14:42:57 +0000 (14:42 +0000)
  write fails.

git-svn-id: file:///svn/unbound/trunk@3193 be551aaa-1e26-0410-a405-d3ace91eadb9

daemon/remote.c
doc/Changelog

index f9369808081b2b1d9f143516ed6676889ffde8cd..46922e4677b7aeca4b99f1b161e546256a594736 100644 (file)
@@ -2088,8 +2088,13 @@ do_list_local_zones(SSL* ssl, struct worker* worker)
        RBTREE_FOR(z, struct local_zone*, &zones->ztree) {
                lock_rw_rdlock(&z->lock);
                dname_str(z->name, buf);
-               (void)ssl_printf(ssl, "%s %s\n", buf, 
-                       local_zone_type2str(z->type));
+               if(!ssl_printf(ssl, "%s %s\n", buf, 
+                       local_zone_type2str(z->type))) {
+                       /* failure to print */
+                       lock_rw_unlock(&z->lock);
+                       lock_rw_unlock(&zones->lock);
+                       return;
+               }
                lock_rw_unlock(&z->lock);
        }
        lock_rw_unlock(&zones->lock);
index 39db2df312a4d5af3a6c9c6bb9bd0cd9276f7c42..7050730874a7aa16dd47b22b77d33c053ece33d5 100644 (file)
@@ -1,3 +1,7 @@
+15 July 2014: Wouter
+       - Fix #596: Bail out of unbound-control list_local_zones when ssl
+         write fails.
+
 13 July 2014: Wouter
        - Configure tests if main can be linked to from getentropy compat.