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
Sebastian Schrader
Kea
Commits
4084c5f2
Commit
4084c5f2
authored
Jul 19, 2013
by
Marcin Siodelski
Browse files
[1555] Throw exception if the interface instance is NULL.
parent
6b65ea8a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bin/dhcp4/dhcp4_srv.cc
View file @
4084c5f2
...
...
@@ -835,6 +835,11 @@ Dhcpv4Srv::openActiveSockets(const uint16_t port,
for
(
IfaceMgr
::
IfaceCollection
::
const_iterator
iface
=
ifaces
.
begin
();
iface
!=
ifaces
.
end
();
++
iface
)
{
Iface
*
iface_ptr
=
IfaceMgr
::
instance
().
getIface
(
iface
->
getName
());
if
(
iface_ptr
==
NULL
)
{
isc_throw
(
isc
::
Unexpected
,
"Interface Manager returned NULL"
<<
" instance of the interface when DHCPv4 server was"
<<
" trying to reopen sockets after reconfiguration"
);
}
if
(
CfgMgr
::
instance
().
isActiveIface
(
iface
->
getName
()))
{
iface_ptr
->
inactive4_
=
false
;
LOG_INFO
(
dhcp4_logger
,
DHCP4_ACTIVATE_INTERFACE
)
...
...
src/bin/dhcp6/dhcp6_srv.cc
View file @
4084c5f2
...
...
@@ -1116,6 +1116,11 @@ Dhcpv6Srv::openActiveSockets(const uint16_t port) {
for
(
IfaceMgr
::
IfaceCollection
::
const_iterator
iface
=
ifaces
.
begin
();
iface
!=
ifaces
.
end
();
++
iface
)
{
Iface
*
iface_ptr
=
IfaceMgr
::
instance
().
getIface
(
iface
->
getName
());
if
(
iface_ptr
==
NULL
)
{
isc_throw
(
isc
::
Unexpected
,
"Interface Manager returned NULL"
<<
" instance of the interface when DHCPv6 server was"
<<
" trying to reopen sockets after reconfiguration"
);
}
if
(
CfgMgr
::
instance
().
isActiveIface
(
iface
->
getName
()))
{
iface_ptr
->
inactive4_
=
false
;
LOG_INFO
(
dhcp6_logger
,
DHCP6_ACTIVATE_INTERFACE
)
...
...
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