Bug #19969

Asking vlanid from an interface does not consider the subnet6

Added by Jo Vandeginste 8 months ago. Updated 7 months ago.

Status:Closed
Priority:Low
Assigned To:-
Category:Network
Target version:-
Difficulty:trivial Bugzilla link:
Found in release:nightly Pull request:https://github.com/theforeman/foreman/pull/4577
Story points-
Velocity based estimate-
Release1.16.0Release relationshipAuto

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
Added by Jo Vandeginste 7 months 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 8 months ago

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

#2 Updated by Jo Vandeginste 7 months ago

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

#3 Updated by Marek Hulán 7 months ago

  • Release set to 1.16.0

Also available in: Atom PDF