summaryrefslogtreecommitdiff
path: root/src/etc/dhcp/dhclient-enter-hooks.d/04-vyos-resolvconf
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-04-01 14:04:50 +0200
committerChristian Breunig <christian@breunig.cc>2024-04-01 14:04:50 +0200
commitece425f0191762638b7c967097accd8739e9103d (patch)
tree36c28edf28af2548cbb13cec5c00e241860019ff /src/etc/dhcp/dhclient-enter-hooks.d/04-vyos-resolvconf
parenta95063831f83dcfe458691b86407b70107b700ad (diff)
downloadvyos-1x-ece425f0191762638b7c967097accd8739e9103d.tar.gz
vyos-1x-ece425f0191762638b7c967097accd8739e9103d.zip
dhcpv6-client: T2590: fix vyos-hostsd update for nameserver and search domains
After migrating from ISC DHCLIENT for IPv6 to wide-dhcp-client the logic which was present to update /etc/resolv.conf with the DHCP specified nameservers and also the search domain list was no longer present. This commit adds a per interface rendered script to inform vyos-hostsd about the received IPv6 nameservers and search domains.
Diffstat (limited to 'src/etc/dhcp/dhclient-enter-hooks.d/04-vyos-resolvconf')
-rw-r--r--src/etc/dhcp/dhclient-enter-hooks.d/04-vyos-resolvconf16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/etc/dhcp/dhclient-enter-hooks.d/04-vyos-resolvconf b/src/etc/dhcp/dhclient-enter-hooks.d/04-vyos-resolvconf
index 518abeaec..9a8a53bfd 100644
--- a/src/etc/dhcp/dhclient-enter-hooks.d/04-vyos-resolvconf
+++ b/src/etc/dhcp/dhclient-enter-hooks.d/04-vyos-resolvconf
@@ -14,14 +14,6 @@ if /usr/bin/systemctl -q is-active vyos-hostsd; then
hostsd_changes=y
fi
- if [ -n "$new_dhcp6_domain_search" ]; then
- logmsg info "Deleting search domains with tag \"dhcpv6-$interface\" via vyos-hostsd-client"
- $hostsd_client --delete-search-domains --tag "dhcpv6-$interface"
- logmsg info "Adding search domain \"$new_dhcp6_domain_search\" with tag \"dhcpv6-$interface\" via vyos-hostsd-client"
- $hostsd_client --add-search-domains "$new_dhcp6_domain_search" --tag "dhcpv6-$interface"
- hostsd_changes=y
- fi
-
if [ -n "$new_domain_name_servers" ]; then
logmsg info "Deleting nameservers with tag \"dhcp-$interface\" via vyos-hostsd-client"
$hostsd_client --delete-name-servers --tag "dhcp-$interface"
@@ -30,14 +22,6 @@ if /usr/bin/systemctl -q is-active vyos-hostsd; then
hostsd_changes=y
fi
- if [ -n "$new_dhcp6_name_servers" ]; then
- logmsg info "Deleting nameservers with tag \"dhcpv6-$interface\" via vyos-hostsd-client"
- $hostsd_client --delete-name-servers --tag "dhcpv6-$interface"
- logmsg info "Adding nameservers \"$new_dhcp6_name_servers\" with tag \"dhcpv6-$interface\" via vyos-hostsd-client"
- $hostsd_client --add-name-servers $new_dhcp6_name_servers --tag "dhcpv6-$interface"
- hostsd_changes=y
- fi
-
if [ $hostsd_changes ]; then
logmsg info "Applying changes via vyos-hostsd-client"
$hostsd_client --apply