From: Andrei Pavel Date: Tue, 22 Mar 2022 20:48:48 +0000 (+0200) Subject: [#2347] subnet null check X-Git-Tag: Kea-2.1.4~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bb95497a8fd533e030cc4372094a0f3ed04882c;p=thirdparty%2Fkea.git [#2347] subnet null check --- diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index ea74b135ab..f5e302d7e4 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -2541,7 +2541,7 @@ Dhcpv4Srv::assignLease(Dhcpv4Exchange& ex) { // Subnet may be modified by the allocation engine, if the initial subnet // belongs to a shared network. - if (subnet->getID() != ctx->subnet_->getID()) { + if (subnet && ctx->subnet_ && subnet->getID() != ctx->subnet_->getID()) { SharedNetwork4Ptr network; subnet->getSharedNetwork(network); LOG_DEBUG(packet4_logger, DBG_DHCP4_BASIC_DATA, DHCP4_SUBNET_DYNAMICALLY_CHANGED)