Project

General

Profile

Actions

Bug #13062

closed

smart-proxy throws an error when the field for fixed-address does not match a valid IP.

Added by Tony Scheffer over 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
DHCP
Target version:
Difficulty:
easy
Triaged:
Fixed in Releases:
Found in Releases:

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'


Related issues 1 (0 open1 closed)

Has duplicate Smart Proxy - Bug #13094: Not able to list DHCP records for a particular subnet through DHCP SmartProxy APIDuplicate01/08/2016Actions
Actions

Also available in: Atom PDF