Bug 70832 - Udev should not blacklist DEVTYPE changes in rules
Summary: Udev should not blacklist DEVTYPE changes in rules
Status: RESOLVED NOTABUG
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-24 09:10 UTC by Juho Östman
Modified: 2013-10-24 12:56 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Juho Östman 2013-10-24 09:10:11 UTC
A couple of USB-attached mobile broadband routers can be used either as a modem or as a network interface. If the device is employed as a network interface, it suffices to ask for IP settings via DHCP, and no other initialization is necessary.

The kernel driver assigns the DEVTYPE "wwan" for these devices, and this information is used by NetworkManager, for example, to decide which user-mode driver should be chosen to configure the interface. If the DEVTYPE is "wwan", the device is treated as a modem, on the other hand, if the DEVTYPE is "eth" or some unrecognized string, the interface is configured as a network interface.

I have used an udev rule like this to select the correct behaviour:
SUBSYSTEM=="net", ATTRS{idVendor}=="1199", ATTRS{idProduct}=="68a3", ENV{ID_MM_CANDIDATE}="0", ENV{DEVTYPE}="eth"

Changing the DEVTYPE in a udev rule is the simplest way to choose how a device should be configured. Actually, NetworkManager does not currently provide any other way to affect the decision. Therefore, changing the DEVTYPE should not be blacklisted.
Comment 1 Kay Sievers 2013-10-24 12:56:58 UTC
DEVTYPE is a primary kernel property which cannot be changed bu userspace.
We cannot overwrite it or store other information in udev than the kernel,
it will just create a huge mess.

Tools using that information should be fixed, ot other properties introduced,
but not kernel variables overwritten.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.