From 0b02a155dde04779a6a9f9b52b399c6ca78cd40e Mon Sep 17 00:00:00 2001 From: Marcin Siodelski Date: Fri, 27 Apr 2018 11:25:06 +0200 Subject: [PATCH] [5458] Added a comment for processDhcpv4Query that it doesn't throw. --- src/bin/dhcp6/dhcp6_srv.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.47.2