]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5449] Extra fixes
authorFrancis Dupont <fdupont@isc.org>
Thu, 31 May 2018 16:22:05 +0000 (18:22 +0200)
committerFrancis Dupont <fdupont@isc.org>
Thu, 31 May 2018 16:22:05 +0000 (18:22 +0200)
src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp6/dhcp6_srv.cc
src/lib/dhcp/pkt6.cc

index 8912441fa41208520fd994510bb1f26a7a4fa8f7..6eacf9ae2aa82d6ae2453ac8f6506d7dd7bea20f 100644 (file)
@@ -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
index a0aa2cb111b9edc2d12956970cf91cf15d006240..0eebcf61f5d89486a9264383cd56077f78e7d701 100644 (file)
@@ -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
index 19de2f7a766645cd4b6e409f22ba8eade5f9292e..f9f45b08a7386414f63b76f8117f04fa06347c0f 100644 (file)
@@ -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<uint8_t> hw_addr(hlen, 0);
     std::vector<unsigned char> duid_data = opt_duid->getData();