From e329ddba948b0782f6b00bae7937931b628fe310 Mon Sep 17 00:00:00 2001 From: Alexander Olofsson Date: Sun, 3 Jun 2018 01:00:11 +0200 Subject: [PATCH] Store all parsed data into configuration Currently much of this data is lost, but a dnsmasq-specific DHCP subnet class would solve that issue --- lib/smart_proxy_dhcp_dnsmasq/dhcp_dnsmasq_subnet_service.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/smart_proxy_dhcp_dnsmasq/dhcp_dnsmasq_subnet_service.rb b/lib/smart_proxy_dhcp_dnsmasq/dhcp_dnsmasq_subnet_service.rb index 14b3d41..d88797d 100644 --- a/lib/smart_proxy_dhcp_dnsmasq/dhcp_dnsmasq_subnet_service.rb +++ b/lib/smart_proxy_dhcp_dnsmasq/dhcp_dnsmasq_subnet_service.rb @@ -129,7 +129,9 @@ def parse_config_for_subnets data.merge! \ interface: subnet_iface ? subnet_iface.name : nil, address: IPAddr.new("#{start_addr}/#{mask}").to_s, + broadcast: broadcast, mask: mask, + mode: mode, range: [start_addr.to_s, end_addr].compact, ttl: ttl @@ -167,7 +169,7 @@ def parse_config_for_subnets end configuration.each do |id, data| - logger.debug "Adding subnet #{id} with configuration; #{data}" + logger.debug "Parsed subnet #{id} (#{data[:address]}) with configuration; #{data}" subnets << ::Proxy::DHCP::Subnet.new(data[:address], data[:mask], data[:options]) end