Ignore wext wireless rtnetlink events
authorSamuel Ortiz <sameo@linux.intel.com>
Mon, 22 Mar 2010 12:06:05 +0000 (13:06 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 22 Mar 2010 16:56:02 +0000 (17:56 +0100)
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.

plugins/wifi.c

index 5fd82b0..dbe4abb 100644 (file)
@@ -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");