Bug #13062
closedsmart-proxy throws an error when the field for fixed-address does not match a valid IP.
Description
When doing the following;
host host.domain {
hardware ethernet 00:01:02:84:12:ab;
fixed-address host1.sub.domain.com;
}
using a hostname instead of an IP, ruby breaks, shown below.
Al tough this is bad practise, I guess a simple regex check should happen before parsing it.
E, [2016-01-08T09:21:44.417704 #4096] ERROR -- : invalid address
D, [2016-01-08T09:21:44.417833 #4096] DEBUG -- : /usr/lib/ruby/1.8/ipaddr.rb:517:in `in6_addr'
/usr/lib/ruby/1.8/ipaddr.rb:477:in `initialize'
/usr/share/foreman-proxy/modules/dhcp/subnet.rb:28:in `new'
/usr/share/foreman-proxy/modules/dhcp/subnet.rb:28:in `include?'
/usr/share/foreman-proxy/modules/dhcp/subnet_service.rb:44:in `find_subnet'
/usr/share/foreman-proxy/modules/dhcp/subnet_service.rb:43:in `each'
/usr/share/foreman-proxy/modules/dhcp/subnet_service.rb:43:in `find_subnet'
Updated by Dominic Cleal almost 9 years ago
- Translation missing: en.field_release set to 104
Updated by Tony Scheffer almost 9 years ago
I assume this is related;
When using the following entry;
host test.domain {
hardware ethernet 00:50:56:84:30:63;
}
It also fails. This is actually valid when you combine this with 'deny unknown-clients'.
Failure;
E, [2016-01-08T12:31:56.591646 #4096] ERROR -- : address family must be specified
D, [2016-01-08T12:31:56.591769 #4096] DEBUG -- : /usr/lib/ruby/1.8/ipaddr.rb:451:in `initialize'
/usr/share/foreman-proxy/modules/dhcp/subnet.rb:28:in `new'
/usr/share/foreman-proxy/modules/dhcp/subnet.rb:28:in `include?'
/usr/share/foreman-proxy/modules/dhcp/subnet_service.rb:44:in `find_subnet'
/usr/share/foreman-proxy/modules/dhcp/subnet_service.rb:43:in `each'
/usr/share/foreman-proxy/modules/dhcp/subnet_service.rb:43:in `find_subnet'
/usr/share/foreman-proxy/modules/dhcp/providers/server/isc.rb:86:in `parse_config_and_leases_for_records'
Updated by Dominic Cleal almost 9 years ago
- Has duplicate Bug #13094: Not able to list DHCP records for a particular subnet through DHCP SmartProxy API added
Updated by Dominic Cleal almost 9 years ago
- Status changed from New to Assigned
- Assignee set to Dominic Cleal
Updated by The Foreman Bot almost 9 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/smart-proxy/pull/357 added
Updated by Dominic Cleal almost 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 31ab121ab56af2d8211b75003396c843bcc67878.