Message ID | CAGCGobAqTef2SzVhARXDPrOh_JTx8sg4SxjNoUoH-J9wtx4aCA@mail.gmail.com |
---|---|
State | Accepted |
Headers | show |
On Mon, Jun 16, 2014 at 07:56:12PM +0530, Jithu Jance wrote: > Looks like last email got the patch as white space corrupted. So > sending it again. Thanks. Though, this one does not look much better in formatting. I applied this manually and with a more accurate commit message. The comments related to P2P Device interface (non-netdev) were a bit confusing here. That is not really the root cause of the issue. The commit you used as the model for this should really have included the changes for this recently added add_ifidx() call as well. The main issue here is in the parent interface getting additional ifindex values registered for it even though that is not really supposed to happen with the wpa_supplicant dynamic interface use cases. In the specific case of the P2P Device interface, that resulted in the RTM_NEWLINK event of the P2P group interface (which was added with that P2P Device interface as the parent) to be processed with incorrect interface and then as a side effect, of that, the P2P Device interface getting marked as unavailable since it did not match the interface name.
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 7568653..baef09d 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -10177,8 +10177,16 @@ static int wpa_driver_nl80211_if_add(void *priv, enum wpa_driver_if_type type, if (drv->global) drv->global->if_add_ifindex = ifidx; - if (ifidx > 0) + /* + * Some virtual interfaces need to process EAPOL packets and events on + * the parent interface. This is used mainly with hostapd. + */ + if ((ifidx > 0) && (drv->hostapd || + nlmode == NL80211_IFTYPE_AP_VLAN || + nlmode == NL80211_IFTYPE_WDS || + nlmode == NL80211_IFTYPE_MONITOR)) { add_ifidx(drv, ifidx); + }