]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- unit test for local unix connection. Documentation and log_addr
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 16 Jan 2015 13:11:07 +0000 (13:11 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 16 Jan 2015 13:11:07 +0000 (13:11 +0000)
  does not inspect port for AF_LOCAL.

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

doc/Changelog
doc/example.conf.in
testdata/ctrl_pipe.tpkg [new file with mode: 0644]
util/net_help.c

index 7bd1ea8c7025541a4358aa3563e0548dabc3d385..db5ad8cdee8d6691cd1c0bb536af67e8ff697e1d 100644 (file)
@@ -1,3 +1,7 @@
+16 January 2015: Wouter
+       - unit test for local unix connection.  Documentation and log_addr
+         does not inspect port for AF_LOCAL.
+
 13 January 2015: Wouter
        - iana portlist update.
 
index e4a01d63457f4d5cd32c8902d1f4009441a37e25..c6e47a27950971256e9576e1cb9c93b7fe038b64 100644 (file)
@@ -553,6 +553,10 @@ remote-control:
        # set up the keys and certificates with unbound-control-setup.
        # control-enable: no
 
+       # Set to no and use an absolute path as control-interface to use
+       # a unix local named pipe for unbound-control.
+       # control-use-cert: yes
+
        # what interfaces are listened to for remote control.
        # give 0.0.0.0 and ::0 to listen to all interfaces.
        # control-interface: 127.0.0.1
diff --git a/testdata/ctrl_pipe.tpkg b/testdata/ctrl_pipe.tpkg
new file mode 100644 (file)
index 0000000..06695e8
Binary files /dev/null and b/testdata/ctrl_pipe.tpkg differ
index 335ee7499e7dbfbb7e778303566de181a9a34192..e2b7c38783ab7faed4381b78aa6e6236f7300587 100644 (file)
@@ -156,7 +156,12 @@ log_addr(enum verbosity_value v, const char* str,
                case AF_INET6: family="ip6";
                        sinaddr = &((struct sockaddr_in6*)addr)->sin6_addr;
                        break;
-               case AF_LOCAL: family="local"; break;
+               case AF_LOCAL:
+                       dest[0]=0;
+                       (void)inet_ntop(af, sinaddr, dest,
+                               (socklen_t)sizeof(dest));
+                       verbose(v, "%s local %s", str, dest);
+                       return; /* do not continue and try to get port */
                default: break;
        }
        if(inet_ntop(af, sinaddr, dest, (socklen_t)sizeof(dest)) == 0) {