Parcourir la source

[2000] Update option code to be different from option length

Mukund Sivaraman il y a 11 ans
Parent
commit
6e87315672

+ 2 - 2
src/lib/dns/tests/rdata_opt_unittest.cc

@@ -37,7 +37,7 @@ class Rdata_OPT_Test : public RdataTest {
 
 const uint8_t rdata_opt_wiredata[] = {
     // Option code
-    0x00, 0x03,
+    0x00, 0x2a,
     // Option length
     0x00, 0x03,
     // Option data
@@ -197,7 +197,7 @@ TEST_F(Rdata_OPT_Test, getPseudoRRs) {
     const std::vector<generic::OPT::PseudoRR>& rrs = rdf.getPseudoRRs();
     ASSERT_FALSE(rrs.empty());
     EXPECT_EQ(1, rrs.size());
-    EXPECT_EQ(3, rrs.at(0).getCode());
+    EXPECT_EQ(0x2a, rrs.at(0).getCode());
     EXPECT_EQ(3, rrs.at(0).getLength());
 
     const uint8_t expected_data[] = {0x00, 0x01, 0x02};

+ 1 - 1
src/lib/dns/tests/testdata/rdata_opt_fromWire1

@@ -8,7 +8,7 @@
 # An OPT RR containing an NSID Option
 #      code=3 len=3 ID value (opaque)
 # 2  3  4  5  6  7  8  9 10
- 00 07 00 03 00 03 00 01 02
+ 00 07 00 2a 00 03 00 01 02
 #
 # Short buffer (this can be tested only at the end of the buffer)
 # 1  2  3  4  5