ATTRS{type} matching in 70-persistent-net.rules

Bug #189779 reported by Ignacy Gawędzki
2
Affects Status Importance Assigned to Milestone
udev (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: udev

In case one is using hostapd, the automatic persistent-net generation is wrong in that it makes the rename rules match with ATTRS{type}=="1". While this measure is effective against matching the wifi* interfaces, /lib/udev/write_net_rules is still adding such a rule for the wlan*ap interface created by hostapd. I have myself changed the line in /lib/udev/write_net_rules as follows, so as to ensure that no wlan* eventually gets renamed to wlan*ap after what hostap creates a wlan*apap, hence a new persistent rules, and so on.

--- write_net_rules.old 2008-02-07 01:13:31.000000000 +0100
+++ write_net_rules 2008-02-07 01:13:16.000000000 +0100
@@ -119,7 +119,7 @@
 # the DRIVERS key is needed to not match bridges and VLAN sub-interfaces
 match="DRIVERS==\"?*\", ATTRS{address}==\"$MAC_ADDR\""
 if [ $basename = "ath" -o $basename = "wlan" ]; then
- match="$match, ATTRS{type}==\"1\"" # do not match the wifi* interfaces
+ match="$match, ATTRS{type}==\"$(sysread type)\"" # do not match the wifi* interfaces
 fi

 write_rule "$match" "$INTERFACE" "$COMMENT"

Revision history for this message
Ignacy Gawędzki (iazz) wrote :

Hmmm... apparently this is not the right solution, as the wifi0 interface gets renamed wlan0ap too. :(

It should be checked whether the type is 1 before writing the rule at all.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Already fixed in upstream release in gutsy

Changed in udev:
status: New → Fix Released
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.