]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2834] Addressed review comments
authorPiotrek Zadroga <piotrek@isc.org>
Fri, 26 May 2023 13:19:55 +0000 (15:19 +0200)
committerPiotrek Zadroga <piotrek@isc.org>
Fri, 26 May 2023 13:22:55 +0000 (15:22 +0200)
doc/sphinx/man/perfdhcp.8.rst
src/bin/perfdhcp/tests/command_options_unittest.cc

index 96cfdbd6ec4f7db7ff60af567cb43313b916b90e..a8e62e94dfc4fe3c4f4ec5a82be4a39a4b6477a4 100644 (file)
@@ -365,8 +365,7 @@ The following options only apply for DHCPv6 (i.e. when ``-6`` is given).
    specifies the option code and the hexstring is a hexadecimal string that
    defines the content of the option. Care should be taken as ``perfdhcp``
    does not offer any kind of logic behind those options; they are simply
-   inserted into packets and sent as is. Be careful not to duplicate
-   options that are already inserted. Please notice that ``encapsulation-level:``
+   inserted into packets and sent as is. Please notice that ``encapsulation-level:``
    is optional and if omitted, default encapsulation-level value 1 is used.
    For example, to insert client class identifier (option code 60) with a
    string "docsis" at first level of encapsulation, use "--or 60,646f63736973"
index c37a775d89fbcb81c50475929ad83f128d08531f..db4254a22b902af04f7602cdae94d3cb3533c3b6 100644 (file)
@@ -1005,3 +1005,13 @@ TEST_F(CommandOptionsTest, UseRelayV6OptionsWithEncapsulationLevelValueTwo) {
     EXPECT_THROW(process(opt, "perfdhcp -6 -A1 --or 2:32,00000E10 -l ethx all"), isc::InvalidParameter);
 }
 
+TEST_F(CommandOptionsTest, UseRelayV6OptionsDuplicated) {
+    CommandOptions opt;
+
+    // multiple relayed options with the same option code are supported.
+    EXPECT_NO_THROW(process(opt, "perfdhcp -6 -A1 --or 1:32,00000E10  --or 32,00000E11 -l ethx all"));
+    EXPECT_TRUE(opt.isUseRelayedV6());
+    EXPECT_EQ(2, opt.getRelayOpts().size());
+}
+
+