diff options
author | Thomas Markwalder <tmark@isc.org> | 2014-02-20 21:27:02 +0100 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2014-02-20 21:27:02 +0100 |
commit | 9a3ec0716d8ca77ce19cda435f79ccb19d06bef1 (patch) | |
tree | 0fc413a7e2eac16d3cc3b06109a47415a85a877c /src/bin/d2/tests/d2_cfg_mgr_unittests.cc | |
parent | [3222] b10-dhcp6 now sends NCRs to b10-dhcp-ddns (diff) | |
download | kea-9a3ec0716d8ca77ce19cda435f79ccb19d06bef1.tar.xz kea-9a3ec0716d8ca77ce19cda435f79ccb19d06bef1.zip |
[3222] Made b10-dhcp-ddns server matching case insensitve
The method used in D2 to match a FQDN (or reverse IP addrss)
to a list of servers, DdnsDomainListMgr::matchDomain(), was
made case insensitive.
Diffstat (limited to 'src/bin/d2/tests/d2_cfg_mgr_unittests.cc')
-rw-r--r-- | src/bin/d2/tests/d2_cfg_mgr_unittests.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/bin/d2/tests/d2_cfg_mgr_unittests.cc b/src/bin/d2/tests/d2_cfg_mgr_unittests.cc index 645bbaea4c..b0e28f801b 100644 --- a/src/bin/d2/tests/d2_cfg_mgr_unittests.cc +++ b/src/bin/d2/tests/d2_cfg_mgr_unittests.cc @@ -1066,6 +1066,10 @@ TEST_F(D2CfgMgrTest, forwardMatch) { EXPECT_TRUE(cfg_mgr_->matchForward("tmark.org", match)); EXPECT_EQ("tmark.org", match->getName()); + // Verify that search is case insensisitive. + EXPECT_TRUE(cfg_mgr_->matchForward("TMARK.ORG", match)); + EXPECT_EQ("tmark.org", match->getName()); + // Verify that an exact match works. EXPECT_TRUE(cfg_mgr_->matchForward("one.tmark.org", match)); EXPECT_EQ("one.tmark.org", match->getName()); @@ -1207,7 +1211,8 @@ TEST_F(D2CfgMgrTest, matchReverse) { " \"dns_servers\" : [ " " { \"ip_address\": \"127.0.0.1\" } " " ] }, " - "{ \"name\": \"2.0.3.0.8.B.D.0.1.0.0.2.ip6.arpa.\" , " + // Note mixed case to test case insensitivity. + "{ \"name\": \"2.0.3.0.8.b.d.0.1.0.0.2.IP6.ARPA.\" , " " \"dns_servers\" : [ " " { \"ip_address\": \"127.0.0.1\" } " " ] }," @@ -1247,7 +1252,7 @@ TEST_F(D2CfgMgrTest, matchReverse) { // Verify a IPv6 match. EXPECT_TRUE(cfg_mgr_->matchReverse("2001:db8:302:99::",match)); - EXPECT_EQ("2.0.3.0.8.B.D.0.1.0.0.2.ip6.arpa.", match->getName()); + EXPECT_EQ("2.0.3.0.8.b.d.0.1.0.0.2.IP6.ARPA.", match->getName()); // Verify a IPv6 wild card match. EXPECT_TRUE(cfg_mgr_->matchReverse("2001:db8:99:302::",match)); |