Browse Source

Fix for failing test in IfaceMgr on FreeBSD (fix after 1238 merge)

Tomek Mrugalski 13 years ago
parent
commit
e26901a197
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/bin/dhcp6/iface_mgr.cc

+ 2 - 1
src/bin/dhcp6/iface_mgr.cc

@@ -340,7 +340,8 @@ IfaceMgr::openSocket6(Iface& iface, const IOAddress& addr, int port) {
     memset(&addr6, 0, sizeof(addr6));
     addr6.sin6_family = AF_INET6;
     addr6.sin6_port = htons(port);
-    addr6.sin6_scope_id = if_nametoindex(iface.getName().c_str());
+    if (addr.toText() != "::1")
+      addr6.sin6_scope_id = if_nametoindex(iface.getName().c_str());
 
     memcpy(&addr6.sin6_addr,
            addr.getAddress().to_v6().to_bytes().data(),