Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
18369354
Commit
18369354
authored
Nov 26, 2013
by
Marcin Siodelski
Browse files
[2765] Close fallback sockets together with primary sockets.
parent
e4d1f908
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/dhcp/iface_mgr.cc
View file @
18369354
...
...
@@ -88,6 +88,10 @@ Iface::closeSockets(const uint16_t family) {
// Close and delete the socket and move to the
// next one.
close
(
sock
->
sockfd_
);
// Close fallback socket if open.
if
(
sock
->
fallbackfd_
)
{
close
(
sock
->
fallbackfd_
);
}
sockets_
.
erase
(
sock
++
);
}
else
{
...
...
@@ -148,6 +152,10 @@ bool Iface::delSocket(uint16_t sockfd) {
while
(
sock
!=
sockets_
.
end
())
{
if
(
sock
->
sockfd_
==
sockfd
)
{
close
(
sockfd
);
// Close fallback socket if open.
if
(
sock
->
fallbackfd_
)
{
close
(
sock
->
fallbackfd_
);
}
sockets_
.
erase
(
sock
);
return
(
true
);
//socket found
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment