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 over 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 about 9 years ago
- Status changed from New to Assigned
- Assignee set to Dominic Cleal
Updated by The Foreman Bot about 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 about 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100