isc-dhcp: add support for multi-homing in 'domain' configs 14601/head
authorPhilip Prindeville <philipp@redfish-solutions.com>
Fri, 29 Jan 2021 01:05:12 +0000 (18:05 -0700)
committerPhilip Prindeville <philipp@redfish-solutions.com>
Fri, 29 Jan 2021 01:12:11 +0000 (18:12 -0700)
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
net/isc-dhcp/Makefile
net/isc-dhcp/files/dhcpd.init

index e01b10eb998777f786547b9c8b1ff1e43df2193f..ee5b51320197a19d74bbb1442852fecb95a95303 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=isc-dhcp
 UPSTREAM_NAME:=dhcp
 PKG_VERSION:=4.4.1
-PKG_RELEASE:=13
+PKG_RELEASE:=14
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
index 1436e7e2aaa5cc292462184e2ce0aa6ad2e81306..14b4a27481face5c45a1f4da50b562cd4d67aaeb 100755 (executable)
@@ -179,17 +179,20 @@ static_cnames() {
 
 static_domain_add() {
        local cfg="$1"
-       local name ip revip
+       local name ip ips revip
 
        config_get name "$cfg" "name"
        [ -n "$name" ] || return 0
        config_get ip "$cfg" "ip"
        [ -n "$ip" ] || return 0
 
-       revip="$(rev_str "$ip" ".")"
+       ips="$ip"
+       for ip in $ips; do
+               revip="$(rev_str "$ip" ".")"
 
-       update "$name.$domain." IN A "$ip"
-       update "$revip.in-addr.arpa." IN PTR "$name.$domain."
+               update "$name.$domain." IN A "$ip"
+               update "$revip.in-addr.arpa." IN PTR "$name.$domain."
+       done
 }
 
 static_domains() {