Parcourir la source

Merge branch 'trac3549' of ssh://git.kea.isc.org/git/kea into trac3549

Tomek Mrugalski il y a 10 ans
Parent
commit
d3b54c4117
4 fichiers modifiés avec 14 ajouts et 12 suppressions
  1. 1 1
      src/lib/dhcp/pkt.cc
  2. 10 8
      src/lib/dhcp/pkt.h
  3. 2 2
      src/lib/dhcp/pkt6.h
  4. 1 1
      src/lib/dhcp/tests/pkt6_unittest.cc

+ 1 - 1
src/lib/dhcp/pkt.cc

@@ -158,7 +158,7 @@ Pkt::getMAC(uint32_t hw_addr_src) {
 
     // Method 5: From remote-id option inserted by a relay
 
-    // Method 6: From subscriber-id option inserted by a releay
+    // Method 6: From subscriber-id option inserted by a relay
 
     // Method 7: From docsis options
 

+ 10 - 8
src/lib/dhcp/pkt.h

@@ -503,14 +503,16 @@ public:
 
 protected:
 
-    /// @brief Attempts to obtain MAC address from source link-local IPv6 address
-    ///
-    /// This method is called from getMAC(HWADDR_SOURCE_IPV6_LINK_LOCAL) and should
-    /// not be called directly. It is not 100% reliable. The source IPv6 address
-    /// does not necessarily have to be link-local (may be global or ULA) and
-    /// even if it's link-local, it doesn't necessarily be based on EUI-64. For
-    /// example, Windows supports RFC4941, which randomized IID part of the
-    /// link-local address. If this method fails, it will return NULL.
+    /// @brief Attempts to obtain MAC address from source link-local
+    /// IPv6 address
+    ///
+    /// This method is called from getMAC(HWADDR_SOURCE_IPV6_LINK_LOCAL)
+    /// and should not be called directly. It is not 100% reliable.
+    /// The source IPv6 address does not necessarily have to be link-local
+    /// (may be global or ULA) and even if it's link-local, it doesn't
+    /// necessarily be based on EUI-64. For example, Windows supports
+    /// RFC4941, which randomized IID part of the link-local address.
+    /// If this method fails, it will return NULL.
     ///
     /// For direct message, it attempts to use remote_addr_ field. For relayed
     /// message, it uses peer-addr of the first relay.

+ 2 - 2
src/lib/dhcp/pkt6.h

@@ -268,7 +268,7 @@ public:
     /// @param question client's packet
     void copyRelayInfo(const Pkt6Ptr& question);
 
-    /// @biref Relay information.
+    /// @brief Relay information.
     ///
     /// This is a public field. Otherwise we hit one of the two problems:
     /// we return reference to an internal field (and that reference could
@@ -278,7 +278,7 @@ public:
     /// (or least bad) solution.
     ///
     /// This vector is arranged in the order packet is encapsulated, i.e.
-    /// relay[0] was the outermort encapsulation (relay closest to the server),
+    /// relay[0] was the outermost encapsulation (relay closest to the server),
     /// relay[last] was the innermost encapsulation (relay closest to the
     /// client).
     std::vector<RelayInfo> relay_info_;

+ 1 - 1
src/lib/dhcp/tests/pkt6_unittest.cc

@@ -973,7 +973,7 @@ TEST_F(Pkt6Test, getMACFromIPv6LinkLocal_singleRelay) {
     pkt.relay_info_[0].peeraddr_ = global;
     EXPECT_FALSE(pkt.getMAC(Pkt::HWADDR_SOURCE_IPV6_LINK_LOCAL));
 
-    // If received from a link-local that does not use EUI-64, it shoul fail
+    // If received from a link-local that does not use EUI-64, it should fail
     pkt.relay_info_[0].peeraddr_ = linklocal_noneui64;
     EXPECT_FALSE(pkt.getMAC(Pkt::HWADDR_SOURCE_IPV6_LINK_LOCAL));