]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3437] Fixed sin6_scope_id setting on Linux.
authorMarcin Siodelski <marcin@isc.org>
Mon, 23 Jun 2014 16:23:36 +0000 (18:23 +0200)
committerMarcin Siodelski <marcin@isc.org>
Mon, 23 Jun 2014 16:23:36 +0000 (18:23 +0200)
src/lib/dhcp/pkt_filter_inet6.cc

index 11f5d6b7e54631a80e8af910326e694ff9522f3b..c6d7b97090d9fcfe4ad74a31927a798505b91adb 100644 (file)
@@ -42,8 +42,9 @@ PktFilterInet6::openSocket(const Iface& iface,
     // For unspecified addresses we set the scope id to the interface index
     // to handle the case when the IfaceMgr is opening a socket which will
     // join the multicast group. Such socket is bound to in6addr_any.
-    if ((addr != IOAddress("::1")) &&
-        ((addr.isV6LinkLocal() || (addr == IOAddress("::"))))) {
+    if (addr.isV6Multicast() ||
+        (addr.isV6LinkLocal() && (addr != IOAddress("::1"))) ||
+        (addr == IOAddress("::"))) {
         addr6.sin6_scope_id = if_nametoindex(iface.getName().c_str());
     }