From: Stephen Morris Date: Mon, 5 Nov 2012 18:41:18 +0000 (+0000) Subject: [2414] Minor corrections to comments and spacing between operators X-Git-Tag: trac2487_base~1^2~31^2~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f25544eeedb66a4f5bb0e0c41387e2e58555daa9;p=thirdparty%2Fkea.git [2414] Minor corrections to comments and spacing between operators --- diff --git a/src/bin/dhcp6/dhcp6_messages.mes b/src/bin/dhcp6/dhcp6_messages.mes index e83da9ca22..d5d3b721cb 100644 --- a/src/bin/dhcp6/dhcp6_messages.mes +++ b/src/bin/dhcp6/dhcp6_messages.mes @@ -51,7 +51,7 @@ server is about to open sockets on the specified port. This debug message indicates that the server successfully advertised a lease. It is up to the client to choose one server out of othe advertised and continue allocation with that server. This is a normal behavior and -incicates successful operation. +indicates successful operation. % DHCP6_LEASE_ALLOC lease %1 has been allocated (client duid=%2, iaid=%3) This debug message indicates that the server successfully granted (in @@ -153,11 +153,6 @@ to a misconfiguration of the server. The packet processing will continue, but the response will only contain generic configuration parameters and no addresses or prefixes. -This is a warning message that a packet was received, but the server is -not configured to support the subnet the packet originated from. This -message means that the received traffic does not match server configuration -and is likely a configuration issue. - % DHCP6_CONFIG_LOAD_FAIL failed to load configuration: %1 This critical error message indicates that the initial DHCPv6 configuration has failed. The server will start, but nothing will be diff --git a/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc b/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc index 1acf83eb66..76f7eff1e5 100644 --- a/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc +++ b/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc @@ -439,7 +439,7 @@ TEST_F(Dhcpv6SrvTest, SolicitInvalidHint) { // clients in ADVERTISEs. Please note that ADVERTISE is not a guarantee that such // and address will be assigned. Had the pool was very small and contained only // 2 addresses, the third client would get the same advertise as the first one -// and this is a correct behavior. It is REQUEST that fill fail for the third +// and this is a correct behavior. It is REQUEST that will fail for the third // client. ADVERTISE is basically saying "if you send me a request, you will // probably get an address like this" (there are no guarantees). TEST_F(Dhcpv6SrvTest, ManySolicits) { @@ -571,7 +571,7 @@ TEST_F(Dhcpv6SrvTest, RequestBasic) { // clients in REQUEST. Please note that ADVERTISE is not a guarantee that such // and address will be assigned. Had the pool was very small and contained only // 2 addresses, the third client would get the same advertise as the first one -// and this is a correct behavior. It is REQUEST that fill fail for the third +// and this is a correct behavior. It is REQUEST that will fail for the third // client. ADVERTISE is basically saying "if you send me a request, you will // probably get an address like this" (there are no guarantees). TEST_F(Dhcpv6SrvTest, ManyRequests) { diff --git a/src/lib/dhcp/addr_utilities.cc b/src/lib/dhcp/addr_utilities.cc index b13c17e986..7032a41b16 100644 --- a/src/lib/dhcp/addr_utilities.cc +++ b/src/lib/dhcp/addr_utilities.cc @@ -47,7 +47,7 @@ const uint8_t bitMask6[]= { 0, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff }; isc::asiolink::IOAddress firstAddrInPrefix6(const isc::asiolink::IOAddress& prefix, uint8_t len) { - if (len>128) { + if (len > 128) { isc_throw(BadValue, "IPv6 prefix length too large:" << len); } @@ -91,11 +91,11 @@ isc::asiolink::IOAddress firstAddrInPrefix6(const isc::asiolink::IOAddress& pref /// @param len netmask length (0-32) isc::asiolink::IOAddress firstAddrInPrefix4(const isc::asiolink::IOAddress& prefix, uint8_t len) { - uint32_t addr = prefix; if (len > 32) { isc_throw(isc::BadValue, "Too large netmask. 0..32 is allowed in IPv4"); } + uint32_t addr = prefix; return (IOAddress(addr & (~bitMask4[len]))); } @@ -108,11 +108,11 @@ isc::asiolink::IOAddress firstAddrInPrefix4(const isc::asiolink::IOAddress& pref /// @param len netmask length (0-32) isc::asiolink::IOAddress lastAddrInPrefix4(const isc::asiolink::IOAddress& prefix, uint8_t len) { - uint32_t addr = prefix; - if (len>32) { + if (len > 32) { isc_throw(isc::BadValue, "Too large netmask. 0..32 is allowed in IPv4"); } + uint32_t addr = prefix; return (IOAddress(addr | bitMask4[len])); } @@ -125,7 +125,7 @@ isc::asiolink::IOAddress lastAddrInPrefix4(const isc::asiolink::IOAddress& prefi /// @param len netmask length (0-128) isc::asiolink::IOAddress lastAddrInPrefix6(const isc::asiolink::IOAddress& prefix, uint8_t len) { - if (len>128) { + if (len > 128) { isc_throw(BadValue, "IPv6 prefix length too large:" << len); }