From: Marcin Siodelski Date: Tue, 17 Oct 2017 15:21:27 +0000 (+0200) Subject: [5376] Addressed review comments. X-Git-Tag: trac5266_base~3^2~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1cba2443979fe33e27617a612c16cba0e3878a4d;p=thirdparty%2Fkea.git [5376] Addressed review comments. Updated User's Guide and rename function. --- diff --git a/doc/guide/dhcp4-srv.xml b/doc/guide/dhcp4-srv.xml index 9996ae474d..d261017c19 100644 --- a/doc/guide/dhcp4-srv.xml +++ b/doc/guide/dhcp4-srv.xml @@ -3852,17 +3852,9 @@ i.e. it will assign increasing integer values starting from 1. It is possible to override default server identifier values by specifying - "dhcp-server-identifier" option. This option can be specified at any - configuration level, but it is recommended to only specify this option on - global, shared network or subnet level. Specifying this option on a class - or host reservation level will work only in cases when the specified - server identifier is an IP address assigned to one of the interfaces on - which the server is listening to DHCP queries. Otherwise, the server - will drop the messages with these server identifiers. The server will - accept messages including server identifiers specified on the global, - shared network and subnet level, even if they point to IP addresses not - assigned to any interfaces, on which the server is listening to the - DHCP queries. + "dhcp-server-identifier" option. This option is only supported on the + global, shared network and subnet level. It must not be specified + on client class and host reservation level. diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index 45972d6570..5a7f05453e 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -2863,7 +2863,7 @@ Dhcpv4Srv::acceptServerId(const Pkt4Ptr& query) const { // This server identifier is not configured for any of the subnets, so // check on the shared network level. CfgSharedNetworks4Ptr cfg_networks = cfg->getCfgSharedNetworks4(); - if (cfg_networks->hasSubnetWithServerId(server_id)) { + if (cfg_networks->hasNetworkWithServerId(server_id)) { return (true); } diff --git a/src/lib/dhcpsrv/cfg_shared_networks.cc b/src/lib/dhcpsrv/cfg_shared_networks.cc index 5b7971df8a..8bdbe40a71 100644 --- a/src/lib/dhcpsrv/cfg_shared_networks.cc +++ b/src/lib/dhcpsrv/cfg_shared_networks.cc @@ -13,7 +13,7 @@ namespace isc { namespace dhcp { bool -CfgSharedNetworks4::hasSubnetWithServerId(const IOAddress& server_id) const { +CfgSharedNetworks4::hasNetworkWithServerId(const IOAddress& server_id) const { const auto& index = networks_.get(); auto network_it = index.find(server_id); return (network_it != index.cend()); diff --git a/src/lib/dhcpsrv/cfg_shared_networks.h b/src/lib/dhcpsrv/cfg_shared_networks.h index 5daaa389ea..252e5e4a22 100644 --- a/src/lib/dhcpsrv/cfg_shared_networks.h +++ b/src/lib/dhcpsrv/cfg_shared_networks.h @@ -119,7 +119,7 @@ public: /// @param server_id Server identifier. /// /// @return true if there is a network with a specified server identifier. - bool hasSubnetWithServerId(const asiolink::IOAddress& server_id) const; + bool hasNetworkWithServerId(const asiolink::IOAddress& server_id) const; };