diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2014-10-01 12:00:14 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2014-11-01 20:07:40 +0100 |
commit | d44690489b57969bfdc44ebfcbfefce6cf3c5b42 (patch) | |
tree | 0e65c312bf82571292e92f9e618d2664cbe60727 | |
parent | f79ec9bf4d94a6ae204e24647bf844d6af2ecb96 (diff) |
udev: Don't mark disconnected RFCOMM ttys as candidates
Bluetooth serial devices are weird. They begin life being bound with
RFCOMMCREATEDEV ioctl() and then move around the sysfs tree when they are
connected and disconnected. The connection is estabilished upon the first
open() and torn down upon last close(), their first user virtually being
"owner" of the connection. We don't want to be that process, we're only
interested in actually connected modems. However, currently we have no
knowledge of that and therefore we connect and disconnect multiple times while
probing.
This patch marks unconnected RFCOMM devices as uninteresting to us.
The actual connection and disconnection will be handled by NetworkManager.
-rw-r--r-- | src/80-mm-candidate.rules | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/80-mm-candidate.rules b/src/80-mm-candidate.rules index 2e938d7a..52e6882e 100644 --- a/src/80-mm-candidate.rules +++ b/src/80-mm-candidate.rules @@ -9,6 +9,10 @@ ACTION!="add|change|move", GOTO="mm_candidate_end" +# Opening bound but disconnected Bluetooth RFCOMM ttys would initiate the +# connection. Don't do that. +KERNEL=="rfcomm[0-9]*", DEVPATH=="*/virtual/*", GOTO="mm_candidate_end" + SUBSYSTEM=="tty", ENV{ID_MM_CANDIDATE}="1" SUBSYSTEM=="net", ENV{ID_MM_CANDIDATE}="1" KERNEL=="cdc-wdm*", SUBSYSTEM=="usb", ENV{ID_MM_CANDIDATE}="1" |