From: Francis Dupont Date: Thu, 31 May 2018 16:22:05 +0000 (+0200) Subject: [5449] Extra fixes X-Git-Tag: trac5694_base~2^2~2^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba30f1b4bc35cb29c0df4a6839c9396a33addaa9;p=thirdparty%2Fkea.git [5449] Extra fixes --- diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index 8912441fa4..6eacf9ae2a 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2017 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2011-2018 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this @@ -765,7 +765,7 @@ Dhcpv4Srv::run_one() { // we were interrupted. And we don't want to print a message every // second. - } catch (const SignalInterruptOnSelect) { + } catch (const SignalInterruptOnSelect&) { // Packet reception interrupted because a signal has been received. // This is not an error because we might have received a SIGTERM, // SIGINT, SIGHUP or SIGCHLD which are handled by the server. For diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index a0aa2cb111..0eebcf61f5 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2017 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2011-2018 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this @@ -432,7 +432,7 @@ void Dhcpv6Srv::run_one() { // second. - } catch (const SignalInterruptOnSelect) { + } catch (const SignalInterruptOnSelect&) { // Packet reception interrupted because a signal has been received. // This is not an error because we might have received a SIGTERM, // SIGINT or SIGHUP which are handled by the server. For signals diff --git a/src/lib/dhcp/pkt6.cc b/src/lib/dhcp/pkt6.cc index 19de2f7a76..f9f45b08a7 100644 --- a/src/lib/dhcp/pkt6.cc +++ b/src/lib/dhcp/pkt6.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2017 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2011-2018 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this @@ -538,6 +538,9 @@ Pkt6::getMACFromDUID() { } uint8_t hlen = opt_duid->getData().size(); + if (!hlen) { + return (mac); + } vector hw_addr(hlen, 0); std::vector duid_data = opt_duid->getData();