Browse Source

[3572] Discard DHCPv4 host options container if it is empty.

This is a small performance improvement.
Marcin Siodelski 9 years ago
parent
commit
97113367f5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/bin/dhcp4/dhcp4_srv.cc

+ 1 - 1
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());
     }