]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
set SO_REUSEPORT only for multicast
authorFrancis Dupont <fdupont@isc.org>
Wed, 25 Sep 2013 08:22:43 +0000 (10:22 +0200)
committerFrancis Dupont <fdupont@isc.org>
Wed, 25 Sep 2013 08:22:43 +0000 (10:22 +0200)
common/socket.c

index 64f5314622b1ab53219db7d9f9d5ab56dfb7b5b8..8a9ebea5f59a3fd4273b41a36b9e91faa08bc594 100644 (file)
@@ -223,7 +223,7 @@ if_register_socket(struct interface_info *info, int family,
         * DHCPv4 sockets; we can't yet support BSD sockets well, much
         * less multiple sockets.
         */
-       if (local_family == AF_INET6) {
+       if ((local_family == AF_INET6) && *do_multicast) {
                flag = 1;
                if (setsockopt(sock, SOL_SOCKET, SO_REUSEPORT,
                               (char *)&flag, sizeof(flag)) < 0) {