]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5364] Avoid null pointer dereference when there is no subnet.
authorMarcin Siodelski <marcin@isc.org>
Thu, 5 Oct 2017 09:17:28 +0000 (11:17 +0200)
committerMarcin Siodelski <marcin@isc.org>
Thu, 5 Oct 2017 09:17:28 +0000 (11:17 +0200)
src/bin/dhcp6/dhcp6_srv.cc

index d016b0f032f66541d00252f3903f6a88cc1bdf82..4d6fbe0ef2b2a0e5852dae6f37ddedd1519d7916 100644 (file)
@@ -1237,7 +1237,7 @@ Dhcpv6Srv::assignLeases(const Pkt6Ptr& question, Pkt6Ptr& answer,
 
     // Subnet may be modified by the allocation engine, if the initial subnet
     // belongs to a shared network.
-    if (subnet->getID() != ctx.subnet_->getID()) {
+    if (ctx.subnet_ && subnet && (subnet->getID() != ctx.subnet_->getID())) {
         SharedNetwork6Ptr network;
         subnet->getSharedNetwork(network);
         if (network) {