Browse Source

[2414] Minor corrections to comments and spacing between operators

Stephen Morris 12 years ago
parent
commit
f25544eeed

+ 1 - 6
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
 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
 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
 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)
 % DHCP6_LEASE_ALLOC lease %1 has been allocated (client duid=%2, iaid=%3)
 This debug message indicates that the server successfully granted (in
 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
 the response will only contain generic configuration parameters and no
 addresses or prefixes.
 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
 % DHCP6_CONFIG_LOAD_FAIL failed to load configuration: %1
 This critical error message indicates that the initial DHCPv6
 This critical error message indicates that the initial DHCPv6
 configuration has failed. The server will start, but nothing will be
 configuration has failed. The server will start, but nothing will be

+ 2 - 2
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
 // 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
 // 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
 // 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
 // client. ADVERTISE is basically saying "if you send me a request, you will
 // probably get an address like this" (there are no guarantees).
 // probably get an address like this" (there are no guarantees).
 TEST_F(Dhcpv6SrvTest, ManySolicits) {
 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
 // 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
 // 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
 // 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
 // client. ADVERTISE is basically saying "if you send me a request, you will
 // probably get an address like this" (there are no guarantees).
 // probably get an address like this" (there are no guarantees).
 TEST_F(Dhcpv6SrvTest, ManyRequests) {
 TEST_F(Dhcpv6SrvTest, ManyRequests) {

+ 5 - 5
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,
 isc::asiolink::IOAddress firstAddrInPrefix6(const isc::asiolink::IOAddress& prefix,
                                             uint8_t len) {
                                             uint8_t len) {
 
 
-    if (len>128) {
+    if (len > 128) {
         isc_throw(BadValue, "IPv6 prefix length too large:" << len);
         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)
 /// @param len netmask length (0-32)
 isc::asiolink::IOAddress firstAddrInPrefix4(const isc::asiolink::IOAddress& prefix,
 isc::asiolink::IOAddress firstAddrInPrefix4(const isc::asiolink::IOAddress& prefix,
                                             uint8_t len) {
                                             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");
         isc_throw(isc::BadValue, "Too large netmask. 0..32 is allowed in IPv4");
     }
     }
 
 
+    uint32_t addr = prefix;
     return (IOAddress(addr & (~bitMask4[len])));
     return (IOAddress(addr & (~bitMask4[len])));
 }
 }
 
 
@@ -108,11 +108,11 @@ isc::asiolink::IOAddress firstAddrInPrefix4(const isc::asiolink::IOAddress& pref
 /// @param len netmask length (0-32)
 /// @param len netmask length (0-32)
 isc::asiolink::IOAddress lastAddrInPrefix4(const isc::asiolink::IOAddress& prefix,
 isc::asiolink::IOAddress lastAddrInPrefix4(const isc::asiolink::IOAddress& prefix,
                                            uint8_t len) {
                                            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");
         isc_throw(isc::BadValue, "Too large netmask. 0..32 is allowed in IPv4");
     }
     }
 
 
+    uint32_t addr = prefix;
     return (IOAddress(addr | bitMask4[len]));
     return (IOAddress(addr | bitMask4[len]));
 }
 }
 
 
@@ -125,7 +125,7 @@ isc::asiolink::IOAddress lastAddrInPrefix4(const isc::asiolink::IOAddress& prefi
 /// @param len netmask length (0-128)
 /// @param len netmask length (0-128)
 isc::asiolink::IOAddress lastAddrInPrefix6(const isc::asiolink::IOAddress& prefix,
 isc::asiolink::IOAddress lastAddrInPrefix6(const isc::asiolink::IOAddress& prefix,
                                            uint8_t len) {
                                            uint8_t len) {
-    if (len>128) {
+    if (len > 128) {
         isc_throw(BadValue, "IPv6 prefix length too large:" << len);
         isc_throw(BadValue, "IPv6 prefix length too large:" << len);
     }
     }