Package: udev
Version: 204-8
Severity: important
Tags: patch

Actually the bug is related to systemd but should be fixed in udev IMO.

If a network device contains a '-' character, ifup is not executed by
systemctl (systemd service) and therefore setup of the device fails.
The character might trigger a conflict because it is used as separator
for device hierarchy, as shown in this example:

  Device name: veth-devmachine
  Syslog entry #1: systemd[1]: Expecting device 
sys-subsystem-net-devices-veth-devmachine
  Syslog entry #2: Starting ifup for veth/devmachine...

Tests show that systemctl with unit /lib/systemd/system/ifup@.service
is the failing step in the execution chain.

It looks that '-' in fact is special to systemd and must be avoided.
Then an error message is essential, because the device naming works
with other startup systems and in the scope of networking that kind of
dependency is not ... er ... obvious.

The attached net.agent-systemd.patch fixes this.


Regards,
   Gero



-- Package-specific info:
[huge udev database deleted because of irrelevance]

-- System Information:
Debian Release: jessie/sid
  APT prefers testing-updates
  APT policy: (500, 'testing-updates'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.13-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_DE@innocircle, LC_CTYPE=en_DE@innocircle (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages udev depends on:
ii  debconf [debconf-2.0]  1.5.53
ii  libacl1                2.2.52-1
ii  libblkid1              2.20.1-5.7
ii  libc6                  2.18-5
ii  libkmod2               16-2
ii  libselinux1            2.2.2-1
ii  libudev1               204-8
ii  lsb-base               4.1+Debian12
ii  procps                 1:3.3.9-2
ii  util-linux             2.20.1-5.7

udev recommends no packages.

udev suggests no packages.

-- debconf information:
  udev/new_kernel_needed: false
  udev/reboot_needed:
  udev/title/upgrade:
  udev/sysfs_deprecated_incompatibility:
--- net.agent.orig	2014-03-19 19:15:08.000000000 +0100
+++ net.agent	2014-05-04 23:36:09.758027176 +0200
@@ -30,6 +30,14 @@
     done
 }
 
+systemd_check_name() {
+    if $(echo "$INTERFACE" | grep -q -- - ) ; then
+        mesg "ERROR: systemd instance naming conflict due to special characters in interface."
+        mesg "net.agent $ACTION event for $INTERFACE not handled."
+        exit 1
+    fi
+}
+
 net_ifup() {
     check_program /sbin/ifup
 
@@ -48,6 +56,7 @@
 
     wait_for_interface lo
     if [ -d /run/systemd/system ]; then
+        systemd_check_name
         exec systemctl start ifup@${INTERFACE}.service
     else
         exec ifup --allow=hotplug $INTERFACE

Reply via email to