Project

General

Profile

Bug #6085

Virsh provider is not interpreting DHCP netmask correctly

Added by Lukas Zapletal over 6 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
DHCP
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

The virsh.rb loadSubnets method was only looking for a definition of a netmask inside the libvirt network XML, despite netmask not being there in case a prefix attribute was defined. netmask and prefix are mutually exclusive by libvirt definition.

Also the ipaddr library has no easy way of retrieving a readable netmask from a prefix, albeit this functionality is provided by the inspect method, in this case the same thing was done as in inspect.

https://github.com/theforeman/smart-proxy/pull/164

Associated revisions

Revision 499c3805 (diff)
Added by Vincent Kramar over 6 years ago

fixes #6085 - fixed virsh dhcp provider netmask interpretation

The virsh.rb loadSubnets method was only looking for a definition of
a netmask inside the libvirt network XML, despite netmask not being
there in case a prefix attribute was defined. netmask and prefix are
mutually exclusive by libvirt definition.

Also the ipaddr library has no easy way of retrieving a readable netmask
from a prefix, albeit this functionality is provided by the inspect
method of IPAddr, a monkey-patch "to_mask" was introduced to circument
the original implementation.

History

#1 Updated by Dmitri Dolguikh over 6 years ago

  • Target version changed from 1.8.2 to 1.8.1

#2 Updated by Anonymous over 6 years ago

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

Also available in: Atom PDF