unbound: fix `create_host_record_from_host` error when `dns` is not set 22721/head
authorJulien Cassette <julien.cassette@gmail.com>
Tue, 21 Nov 2023 08:43:29 +0000 (09:43 +0100)
committerJulien Cassette <julien.cassette@gmail.com>
Wed, 22 Nov 2023 12:19:00 +0000 (13:19 +0100)
The function `create_host_record_from_host` fails if the `dns` option
is not set in the host entry.
This sets a default to the `dns` variable in order to fix this error.

Fixes: #22691
Signed-off-by: Julien Cassette <julien.cassette@gmail.com>
net/unbound/Makefile
net/unbound/files/dnsmasq.sh

index a2bf99535c775d3d2c2111348bdfc8df5c1a9f4f..3a7a27cbf7b681bdefe1bc1cad6d5c79a0a07bb9 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=unbound
 PKG_VERSION:=1.19.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://nlnetlabs.nl/downloads/unbound
index b507535f3003cf3f9d89d627fa5b3ad918d3bc29..28f3c86dcf9fb66ae318f475c44c9cde7e54ed5d 100644 (file)
@@ -107,7 +107,7 @@ create_host_record_from_host() {
   local dns ip name
 
   # basefiles dhcp "host" clause which means host A and PTR records
-  config_get dns  "$cfg" dns
+  config_get dns  "$cfg" dns 0
   config_get ip   "$cfg" ip
   config_get name "$cfg" name