Skip to content

Commit

Permalink
[5649] Ignore writes on exernal sockets.
Browse files Browse the repository at this point in the history
  • Loading branch information
msiodelski committed Jun 14, 2018
1 parent 66154e3 commit 995830f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/dhcp/iface_mgr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,8 @@ Pkt4Ptr IfaceMgr::receive4(uint32_t timeout_sec, uint32_t timeout_usec /* = 0 */

// Let's find out which socket has the data
BOOST_FOREACH(SocketCallbackInfo s, callbacks_) {
if (!FD_ISSET(s.socket_, &sockets)) {
if ((!FD_ISSET(s.socket_, &sockets) &&
(!FD_ISSET(s.socket_, &write_sockets)))) {
continue;
}

Expand Down Expand Up @@ -1094,7 +1095,8 @@ Pkt6Ptr IfaceMgr::receive6(uint32_t timeout_sec, uint32_t timeout_usec /* = 0 */

// Let's find out which socket has the data
BOOST_FOREACH(SocketCallbackInfo s, callbacks_) {
if (!FD_ISSET(s.socket_, &sockets)) {
if ((!FD_ISSET(s.socket_, &sockets) &&
(!FD_ISSET(s.socket_, &write_sockets)))) {
continue;
}

Expand Down

0 comments on commit 995830f

Please sign in to comment.