Project

General

Profile

Bug #19969

Asking vlanid from an interface does not consider the subnet6

Added by Jo Vandeginste about 1 year ago. Updated 10 days ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
Network
Target version:
Difficulty:
trivial
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

You can have a network interface with an ipv6 subnet configured but
without an ipv4 subnet; in this case, the function vlanid for
interface will throw an error.

Associated revisions

Revision d093bdb6 (diff)
Added by Jo Vandeginste about 1 year ago

fixes #19969 - consider subnet6 when determining vlanid

You can have a network interface with an ipv6 subnet configured but
without an ipv4 subnet; in this case, the function `vlanid` for
`interface` would throw an error. This PR fixes that error.

This fix will test for `nil` on `subnet` and fall back to `subnet6`.
If both subnets are absent, we return an empty string. It also takes
into account blank vlanids

History

#1 Updated by The Foreman Bot about 1 year ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4577 added

#2 Updated by Jo Vandeginste about 1 year ago

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

#3 Updated by Marek Hulán about 1 year ago

  • Legacy Backlogs Release (now unused) set to 240

Also available in: Atom PDF