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
Related issues
Bug #19969: Asking vlanid from an interface does not consider the subnet6
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