Parcourir la source

[5258] Correct bug in error path in PoolParser

Correct a trivial error that led to a crash (instead of the raising
of an exception) when parsing an incorrect "pools" clause.
Stephen Morris il y a 8 ans
Parent
commit
4cc586491d
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/lib/dhcpsrv/parsers/dhcp_parsers.cc

+ 1 - 1
src/lib/dhcpsrv/parsers/dhcp_parsers.cc

@@ -644,7 +644,7 @@ PoolParser::parse(PoolStoragePtr pools,
 
     if (!text_pool) {
         isc_throw(DhcpConfigError, "Mandatory 'pool' entry missing in "
-                  "definition: (" << text_pool->getPosition() << ")");
+                  "definition: (" << pool_structure->getPosition() << ")");
     }
 
     // That should be a single pool representation. It should contain