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 almost 9 years ago. Updated over 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 #1

Updated by Dominic Cleal almost 9 years ago

  • Translation missing: en.field_release set to 104
Actions #2

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'

Actions #3

Updated by Dominic Cleal almost 9 years ago

  • Priority changed from Low to Normal
Actions #4

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
Actions #5

Updated by Dominic Cleal almost 9 years ago

  • Status changed from New to Assigned
  • Assignee set to Dominic Cleal
Actions #6

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
Actions #7

Updated by Dominic Cleal almost 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF