From: Marcin Siodelski Date: Mon, 23 Jun 2014 16:23:36 +0000 (+0200) Subject: [3437] Fixed sin6_scope_id setting on Linux. X-Git-Tag: trac3473_base~2^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dfe5a558393203b8fe77ff3fed01201ab5ba0c35;p=thirdparty%2Fkea.git [3437] Fixed sin6_scope_id setting on Linux. --- diff --git a/src/lib/dhcp/pkt_filter_inet6.cc b/src/lib/dhcp/pkt_filter_inet6.cc index 11f5d6b7e5..c6d7b97090 100644 --- a/src/lib/dhcp/pkt_filter_inet6.cc +++ b/src/lib/dhcp/pkt_filter_inet6.cc @@ -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()); }