summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-03-22 13:06:05 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2010-03-22 17:56:02 +0100
commit4997f6e38f34effc00179e849dee0dc2e2263d3a (patch)
tree93a4fcd4a76450e5e4f1ee4434a6a316da82ef27
parent0f775e45e9ca49ba53357f3d18fd7a09337f0dfe (diff)
downloadconnman-4997f6e38f34effc00179e849dee0dc2e2263d3a.tar.gz
connman-4997f6e38f34effc00179e849dee0dc2e2263d3a.tar.bz2
connman-4997f6e38f34effc00179e849dee0dc2e2263d3a.zip
Ignore wext wireless rtnetlink events
The kernel wext core sends wireless events through the rtnetlink channel. They show up with the ifi_change field set to 0. The problem with those messages is that their ifi_flags might be unsynchronized due to the fact that the actual message sending is handled by a workqueue that doesnt build the message. ifi_flags is set to dev_flags, but by the time the message is sent dev_flags might have changed. Connman should just ignore those messages as we don't care about wext events at all.
-rw-r--r--plugins/wifi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c
index 5fd82b0f..dbe4abbe 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -94,6 +94,9 @@ static void wifi_newlink(unsigned flags, unsigned change, void *user_data)
DBG("index %d flags %d change %d", wifi->index, flags, change);
+ if (!change)
+ return;
+
if ((wifi->flags & IFF_UP) != (flags & IFF_UP)) {
if (flags & IFF_UP) {
DBG("power on");