From: Marcin Siodelski Date: Tue, 31 May 2016 09:37:28 +0000 (+0200) Subject: [3572] Discard DHCPv4 host options container if it is empty. X-Git-Tag: trac4272a_base~3^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97113367f5c999d9c2030a5e9ec464b63879b7da;p=thirdparty%2Fkea.git [3572] Discard DHCPv4 host options container if it is empty. This is a small performance improvement. --- diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index 47afca878a..05333e0cb7 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -926,7 +926,7 @@ Dhcpv4Srv::buildCfgOptionList(Dhcpv4Exchange& ex) { // Firstly, host specific options. const ConstHostPtr& host = ex.getContext()->host_; - if (host) { + if (host && !host->getCfgOption4()->empty()) { co_list.push_back(host->getCfgOption4()); }