Skip to content

Commit 6aab3e9

Browse files
author
Razvan Becheriu
committed
[#3049] fixed empty hostname case
1 parent df35252 commit 6aab3e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin/dhcp6/tests/fqdn_unittest.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ class FqdnDhcpv6SrvTest : public Dhcpv6SrvTest {
521521
OptionPtr srvid = srv_->getServerID();
522522
// Set the appropriate FQDN type. It must be partial if hostname is
523523
// empty or if it does not end with dot '.'.
524-
Option6ClientFqdn::DomainNameType fqdn_type = (hostname.back() != '.' ?
524+
Option6ClientFqdn::DomainNameType fqdn_type = ((hostname.empty() || hostname.back() != '.') ?
525525
Option6ClientFqdn::PARTIAL : Option6ClientFqdn::FULL);
526526

527527
Pkt6Ptr req = generateMessage(msg_type, client_flags,

0 commit comments

Comments
 (0)