NICs named enpXsX not properly recognized as raw devices

Bug #1565561 reported by Simon Déziel
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
vlan (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

With an interfaces stanza like this:

auto br-trunk0
iface br-trunk0 inet static
  address 192.168.29.7/24
  bridge_ports enp3s0.29
  bridge_stp off
  bridge_fd 0
  bridge_maxwait 0

The bridge port isn't brought up because the vlan pre-up script doesn't handle devices named like enpXsX.

The attached patch fixes the problem for me.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: vlan (not installed)
ProcVersionSignature: Ubuntu 4.4.0-16.32-generic 4.4.6
Uname: Linux 4.4.0-16-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
ApportVersion: 2.20.1-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Sun Apr 3 16:23:21 2016
SourcePackage: vlan
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Simon Déziel (sdeziel) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Teach vlan pre-up script about enpXsX devices" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Simon Déziel (sdeziel) wrote :

The code extracting VLANID and IF_VLAN_RAW_DEVICE seems overly complex IMHO. The "case" statement already ensures we operate on vlan device so I think something much simpler would work:

  VLANID=`echo $IFACE|sed "s/[^.]\+\.\([0-9]\+\).*/\1/; s/^0//"`
  IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\([^.]\+\)\.[0-9]\+.*/\1/"`

This is also easier to read.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in vlan (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.