diff --git a/daemon/face/multicast-udp-transport.cpp b/daemon/face/multicast-udp-transport.cpp
index bcb799e..6082745 100644
--- a/daemon/face/multicast-udp-transport.cpp
+++ b/daemon/face/multicast-udp-transport.cpp
@@ -134,7 +134,7 @@
 MulticastUdpTransport::openRxSocket(protocol::socket& sock,
                                     const protocol::endpoint& multicastGroup,
                                     const boost::asio::ip::address& localAddress,
-                                    const shared_ptr<const ndn::net::NetworkInterface>& netif)
+                                    const ndn::net::NetworkInterface* netif)
 {
   BOOST_ASSERT(!sock.is_open());
 
@@ -148,16 +148,9 @@
                                                            localAddress.to_v4()));
   }
   else {
-    BOOST_ASSERT(localAddress.is_v6());
+    BOOST_ASSERT(multicastGroup.address().to_v6().scope_id() != 0);
     sock.set_option(boost::asio::ip::v6_only(true));
-#ifdef NFD_WITH_TESTS
-    // To simplify unit tests, we bind to the "any" IPv6 address if the supplied multicast
-    // address lacks a scope id. Calling bind() without a scope id would otherwise fail.
-    if (multicastGroup.address().to_v6().scope_id() == 0)
-      sock.bind(protocol::endpoint(boost::asio::ip::address_v6::any(), multicastGroup.port()));
-    else
-#endif
-      sock.bind(multicastGroup);
+    sock.bind(multicastGroup);
     sock.set_option(boost::asio::ip::multicast::join_group(multicastGroup.address().to_v6()));
   }
 
@@ -168,7 +161,7 @@
 void
 MulticastUdpTransport::openTxSocket(protocol::socket& sock,
                                     const protocol::endpoint& localEndpoint,
-                                    const shared_ptr<const ndn::net::NetworkInterface>& netif,
+                                    const ndn::net::NetworkInterface* netif,
                                     bool enableLoopback)
 {
   BOOST_ASSERT(!sock.is_open());
diff --git a/daemon/face/multicast-udp-transport.hpp b/daemon/face/multicast-udp-transport.hpp
index 23c1e1d..5295238 100644
--- a/daemon/face/multicast-udp-transport.hpp
+++ b/daemon/face/multicast-udp-transport.hpp
@@ -62,16 +62,22 @@
   ssize_t
   getSendQueueLength() final;
 
+  /**
+   * \brief Opens and configures the receive-side socket
+   */
   static void
   openRxSocket(protocol::socket& sock,
                const protocol::endpoint& multicastGroup,
-               const boost::asio::ip::address& localAddress,
-               const shared_ptr<const ndn::net::NetworkInterface>& netif = nullptr);
+               const boost::asio::ip::address& localAddress = {},
+               const ndn::net::NetworkInterface* netif = nullptr);
 
+  /**
+   * \brief Opens and configures the transmit-side socket
+   */
   static void
   openTxSocket(protocol::socket& sock,
                const protocol::endpoint& localEndpoint,
-               const shared_ptr<const ndn::net::NetworkInterface>& netif = nullptr,
+               const ndn::net::NetworkInterface* netif = nullptr,
                bool enableLoopback = false);
 
 private:
diff --git a/daemon/face/udp-factory.cpp b/daemon/face/udp-factory.cpp
index 331174d..fafa29e 100644
--- a/daemon/face/udp-factory.cpp
+++ b/daemon/face/udp-factory.cpp
@@ -324,7 +324,7 @@
 }
 
 shared_ptr<Face>
-UdpFactory::createMulticastFace(const shared_ptr<const net::NetworkInterface>& netif,
+UdpFactory::createMulticastFace(const net::NetworkInterface& netif,
                                 const ip::address& localAddress,
                                 const udp::Endpoint& multicastEndpoint)
 {
@@ -337,7 +337,7 @@
   if (mcastEp.address().is_v6()) {
     // in IPv6, a scope id on the multicast address is always required
     auto mcastAddress = mcastEp.address().to_v6();
-    mcastAddress.scope_id(netif->getIndex());
+    mcastAddress.scope_id(netif.getIndex());
     mcastEp.address(mcastAddress);
   }
 
@@ -358,9 +358,9 @@
   }
 
   ip::udp::socket rxSock(getGlobalIoService());
-  MulticastUdpTransport::openRxSocket(rxSock, mcastEp, localAddress, netif);
+  MulticastUdpTransport::openRxSocket(rxSock, mcastEp, localAddress, &netif);
   ip::udp::socket txSock(getGlobalIoService());
-  MulticastUdpTransport::openTxSocket(txSock, udp::Endpoint(localAddress, 0), netif);
+  MulticastUdpTransport::openTxSocket(txSock, udp::Endpoint(localAddress, 0), &netif);
 
   GenericLinkService::Options options;
   options.allowCongestionMarking = m_wantCongestionMarking;
@@ -442,7 +442,7 @@
 
   std::vector<shared_ptr<Face>> faces;
   for (const auto& addr : addrs) {
-    auto face = this->createMulticastFace(netif, addr,
+    auto face = this->createMulticastFace(*netif, addr,
                                           addr.is_v4() ? m_mcastConfig.group : m_mcastConfig.groupV6);
     if (face->getId() == INVALID_FACEID) {
       // new face: register with forwarding
diff --git a/daemon/face/udp-factory.hpp b/daemon/face/udp-factory.hpp
index 475621d..f0cd686 100644
--- a/daemon/face/udp-factory.hpp
+++ b/daemon/face/udp-factory.hpp
@@ -90,7 +90,7 @@
    * \throw UdpFactory::Error
    */
   shared_ptr<Face>
-  createMulticastFace(const shared_ptr<const ndn::net::NetworkInterface>& netif,
+  createMulticastFace(const ndn::net::NetworkInterface& netif,
                       const boost::asio::ip::address& localAddress,
                       const udp::Endpoint& multicastEndpoint);
 
