From: Marcin Siodelski Date: Fri, 27 Apr 2018 09:25:06 +0000 (+0200) Subject: [5458] Added a comment for processDhcpv4Query that it doesn't throw. X-Git-Tag: trac5488_base~2^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b02a155dde04779a6a9f9b52b399c6ca78cd40e;p=thirdparty%2Fkea.git [5458] Added a comment for processDhcpv4Query that it doesn't throw. --- diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index 151a3e274b..1fb688ccdf 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -653,6 +653,8 @@ Dhcpv6Srv::processPacket(Pkt6Ptr& query, Pkt6Ptr& rsp) { } if (query->getType() == DHCPV6_DHCPV4_QUERY) { + // This call never throws. Should this change, this section must be + // enclosed in try-catch. processDhcp4Query(query); return; } @@ -3280,7 +3282,7 @@ Dhcpv6Srv::processDhcp4Query(const Pkt6Ptr& dhcp4_query) { try { // Forward the whole message to the DHCPv4 server via IPC Dhcp6to4Ipc::instance().send(dhcp4_query); - } catch (const std::exception&) { + } catch (...) { // Assume the error was already logged return; }