Browse Source

[3554] Changes after review:
- eth0 => ethX in several examples
- added @todo in Dhcp6Srv, getMAC() is now static
- added @todo in CfgMACSource

Tomek Mrugalski 10 years ago
parent
commit
c12560be72

+ 1 - 1
doc/examples/kea4/multiple-options.json

@@ -36,7 +36,7 @@
     {
        "pools": [ { "pool":  "192.0.2.10 - 192.0.2.200" } ],
        "subnet": "192.0.2.0/24",
-       "interface": "eth0",
+       "interface": "ethX",
        "option-data": [
          {
              "name": "domain-name-servers",

+ 2 - 2
doc/examples/kea4/single-subnet.json

@@ -35,8 +35,8 @@
     {
        "pools": [ { "pool":  "192.0.2.1 - 192.0.2.200" } ],
        "subnet": "192.0.2.0/24",
-       "interface": "eth0"
-    } 
+       "interface": "ethX"
+    }
   ]
 },
 

+ 2 - 2
doc/examples/kea6/advanced.json

@@ -2,7 +2,7 @@
 # It attempts to showcase some of the more advanced features.
 # Topology wise, it's a basic scenario with one IPv6 subnet configured.
 # It is assumed that one subnet (2001:db8:1::/64) is available directly
-# over eth0 interface.
+# over ethX interface.
 #
 # The following features are currently showcased here:
 # 1. Configuration of MAC/hardware address sources in DHCPv6
@@ -54,7 +54,7 @@
     {
       "pools": [ { "pool": "2001:db8:1::/80" } ],
       "subnet": "2001:db8:1::/64",
-      "interface": "eth0"
+      "interface": "ethX"
     }
   ]
 },

+ 1 - 1
doc/examples/kea6/multiple-options.json

@@ -32,7 +32,7 @@
     {
       "pools": [ { "pool": "2001:db8:1::/80" } ],
       "subnet": "2001:db8:1::/64",
-      "interface": "eth0",
+      "interface": "ethX",
       "option-data": [
         {
             "name": "dns-servers",

+ 2 - 2
doc/examples/kea6/simple.json

@@ -1,7 +1,7 @@
 # This is an example configuration file for DHCPv6 server in Kea.
 # It's a basic scenario with one IPv6 subnet configured. It is
 # assumed that one subnet (2001:db8:1::/64 is available directly
-# over eth0 interface.
+# over ethX interface.
 
 { "Dhcp6":
 
@@ -33,7 +33,7 @@
     {
       "pools": [ { "pool": "2001:db8:1::/80" } ],
       "subnet": "2001:db8:1::/64",
-      "interface": "eth0"
+      "interface": "ethX"
     }
   ]
 },

+ 2 - 3
src/bin/dhcp6/dhcp6_srv.h

@@ -596,15 +596,14 @@ protected:
     /// @param pkt packet to be classified
     void classifyPacket(const Pkt6Ptr& pkt);
 
-
     /// @brief Attempts to get a MAC/hardware address using configred sources
     ///
     /// Tries to extract MAC/hardware address information from the packet
-    /// using MAC sources configured in 'mac-sources' directive.
+    /// using MAC sources configured in 'mac-sources' configuration parameter.
     ///
     /// @param pkt will try to exact MAC address from this packet
     /// @return HWaddr pointer (or NULL if configured methods fail)
-    HWAddrPtr getMAC(const Pkt6Ptr& pkt);
+    static HWAddrPtr getMAC(const Pkt6Ptr& pkt);
 
     /// @brief this is a prefix added to the contend of vendor-class option
     ///

+ 1 - 0
src/lib/dhcpsrv/cfg_mac_source.h

@@ -58,6 +58,7 @@ class CfgMACSource {
     /// @param source MAC source (see constants in Pkt::HWADDR_SOURCE_*)
     ///
     /// Specified source is being added to the mac_sources_ array.
+    /// @todo implement add(string) version of this method.
     void add(uint32_t source) {
         mac_sources_.push_back(source);
     }