Skip to content

Commit 0867a03

Browse files
author
Razvan Becheriu
committed
[#4360] added unit tests
1 parent aab97b3 commit 0867a03

File tree

2 files changed

+380
-4
lines changed

2 files changed

+380
-4
lines changed

src/lib/dhcp/iface_mgr.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ IfaceMgr::openSockets6(const uint16_t port,
711711
// with interface with 2 global addresses, we would bind 3 sockets
712712
// (one for link-local and two for global). That would result in
713713
// getting each message 3 times.
714-
if (!addr.get().isV6LinkLocal()){
714+
if (!addr.get().isV6LinkLocal()) {
715715
continue;
716716
}
717717

@@ -726,7 +726,7 @@ IfaceMgr::openSockets6(const uint16_t port,
726726
// the interface actually has opened sockets by checking the number
727727
// of sockets to be non zero.
728728
if (!skip_opened || !IfaceMgr::hasOpenSocket(addr) ||
729-
!iface->getSockets().size()) {
729+
iface->getSockets().size() <= iface->getUnicasts().size()) {
730730
try {
731731
// Pass a null pointer as an error handler to avoid
732732
// suppressing an exception in a system-specific function.

0 commit comments

Comments
 (0)