Merge pull request #22091 from pprindeville/isc-dhcp-fix-require-parameters-delim

isc-dhcpd: Generate correct delimiter in hex strings
This commit is contained in:
Philip Prindeville 2023-09-17 16:19:31 -06:00 committed by GitHub
commit 4108ca7aed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 8 deletions

View file

@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=isc-dhcp PKG_NAME:=isc-dhcp
UPSTREAM_NAME:=dhcp UPSTREAM_NAME:=dhcp
PKG_VERSION:=4.4.3-P1 PKG_VERSION:=4.4.3-P1
PKG_RELEASE:=5 PKG_RELEASE:=6
PKG_LICENSE:=BSD-3-Clause PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE PKG_LICENSE_FILES:=LICENSE

View file

@ -294,17 +294,17 @@ static_host_add() {
for option in $force_send; do for option in $force_send; do
case "$option" in case "$option" in
hostname) hostname)
extra_options="$extra_options${extra_options:+ }0c" ;; extra_options="$extra_options${extra_options:+,}0c" ;;
domain-name) domain-name)
extra_options="$extra_options${extra_options:+ }0f" ;; extra_options="$extra_options${extra_options:+,}0f" ;;
renewal-time) renewal-time)
extra_options="$extra_options${extra_options:+ }3a" ;; extra_options="$extra_options${extra_options:+,}3a" ;;
rebinding-time) rebinding-time)
extra_options="$extra_options${extra_options:+ }3b" ;; extra_options="$extra_options${extra_options:+,}3b" ;;
fqdn) fqdn)
extra_options="$extra_options${extra_options:+ }51" ;; extra_options="$extra_options${extra_options:+,}51" ;;
routes) routes)
extra_options="$extra_options${extra_options:+ }79" ;; extra_options="$extra_options${extra_options:+,}79" ;;
*) *)
echo "unknown option: $option" >&2 ;; echo "unknown option: $option" >&2 ;;
esac esac
@ -393,6 +393,8 @@ gen_dhcp_subnet() {
fi fi
echo " option domain-name-servers $DNS;" echo " option domain-name-servers $DNS;"
[ -n "$domain" ] && echo " option domain-name \"$domain\";"
local routes= local routes=
config_list_foreach "$cfg" "routes" append_routes config_list_foreach "$cfg" "routes" append_routes
[ -n "$routes" ] && echo " option classless-ipv4-route $routes;" [ -n "$routes" ] && echo " option classless-ipv4-route $routes;"
@ -405,7 +407,7 @@ dhcpd_add() {
local cfg="$1" synthesize="$2" local cfg="$1" synthesize="$2"
local dhcp6range="::" local dhcp6range="::"
local dynamicdhcp defaultroute end gateway ifname ignore leasetime limit net netmask local dynamicdhcp defaultroute end gateway ifname ignore leasetime limit net netmask
local proto networkid start subnet local proto networkid start subnet domain
local IP NETMASK BROADCAST NETWORK PREFIX DNS START END local IP NETMASK BROADCAST NETWORK PREFIX DNS START END
config_get_bool ignore "$cfg" "ignore" 0 config_get_bool ignore "$cfg" "ignore" 0
@ -462,6 +464,8 @@ dhcpd_add() {
gateway="$IP" gateway="$IP"
fi fi
config_get domain "$cfg" "domain"
gen_dhcp_subnet "$cfg" gen_dhcp_subnet "$cfg"
} }