Skip to content

Commit

Permalink
Fix search domain addition to resolv.conf
Browse files Browse the repository at this point in the history
Typo was present which prevented more than a one search domains
to be put into resolv.conf. This commit fixes the issue.

Fix: #45
  • Loading branch information
TomasKorbar committed Jun 28, 2024
1 parent 668fd2e commit bef3450
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion dnsconfd/fsm/dnsconfd_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,6 @@ def _get_zones_to_servers(self):
self.lgr.debug(f"Processing interface {interface}")
interface: InterfaceConfiguration
interface_zones = []
search_domains = []
for dom in interface.domains:
interface_zones.append(dom[0])
if not dom[1]:
Expand Down
1 change: 0 additions & 1 deletion tests/dhcpd-common.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ subnet 192.168.6.0 netmask 255.255.255.0 {
option routers 192.168.6.1;
option subnet-mask 255.255.255.0;
option domain-name "test.com";
option domain-search "test.com";
option domain-name-servers 192.168.6.3, 192.168.6.4;
range 192.168.6.2 192.168.6.3;
}
1 change: 1 addition & 0 deletions tests/vpn/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ rlJournalStart
rlRun "podman exec $dnsconfd_cid dnsconfd --dbus-name=$DBUS_NAME status --json > status2" 0 "Getting status of dnsconfd"
rlAssertNotDiffer status2 $ORIG_DIR/expected_status2.json
rlRun "podman exec $dnsconfd_cid getent hosts dummy | grep 192.168.6.5" 0 "Verifying correct address resolution"
rlRun "podman exec $dnsconfd_cid getent hosts second-address | grep 192.168.6.4" 0 "Verifying correct address resolution"
rlPhaseEnd

rlPhaseStartCleanup
Expand Down

0 comments on commit bef3450

Please sign in to comment.