Bug #1851

ip.rb Facter::IPAddress.get_interfaces does not handle interfaces that are vlan and aliased

Added by snemetz - over 3 years ago. Updated over 3 years ago.

Status:Duplicate Start date:01/06/2009
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:library
Target version:-
Keywords: Affected Facter version:
Branch:
Votes: 0

Description

Current code will only handle eth0.10 or eth0:2, but not eth0.10:2

The line:

int = output.scan(/^\w+[.:]?\d+/)

needs to change

One option is to change it to:

int = output.scan(/^\w+[.:]?\d+[.:]?\d+?/)

This will work but it is not pretty.

A better way, would be:

int = output.scan(/^\w+\d+([.:]\d+){0,2}/)

But it doesn’t appear to get parsed correctly. I haven’t learned enough ruby yet, to figure out why. I have books that show syntax similar to this.

History

Updated by James Turnbull over 3 years ago

  • Status changed from Unreviewed to Duplicate
  • Target version deleted (1.5.3)

Duplicate. Already fixed in 1.5.3.

Updated by snemetz - over 3 years ago

  • Status changed from Duplicate to Re-opened

This is NOT fixed in the latest file in the repository. I made sure I checked first this time.

Updated by James Turnbull over 3 years ago

  • Status changed from Re-opened to Duplicate

Duplicate – it’s fixed in Luke’s current Facter repo and the code is under review. When it is reviewed it’ll be committed mainline and released in 1.5.3.

Also available in: Atom PDF