]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[4106_rebase] Bind to ::1 too
authorFrancis Dupont <fdupont@isc.org>
Mon, 6 Jun 2016 15:41:25 +0000 (17:41 +0200)
committerFrancis Dupont <fdupont@isc.org>
Mon, 6 Jun 2016 15:41:25 +0000 (17:41 +0200)
src/lib/dhcpsrv/dhcp4o6_ipc.cc

index 3eab361a82f5d82bc2ac178669a5dd9850c0dcbe..35044434116ebd9265a1e76a874a115d4db512de 100644 (file)
@@ -88,6 +88,8 @@ int Dhcp4o6IpcBase::open(uint16_t port, int side) {
     } else {
         local6.sin6_port = htons(port + 1);
     }
+    // We'll connect to the loopback address so bind to it too.
+    local6.sin6_addr.s6_addr[15] = 1;
     if (bind(sock, (struct sockaddr *)&local6, sizeof(local6)) < 0) {
         ::close(sock);
         isc_throw(Unexpected, "Failed to bind DHCP4o6 socket.");