430-supplicant_bridge_fix.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --- a/src/drivers/driver_nl80211.c
  2. +++ b/src/drivers/driver_nl80211.c
  3. @@ -410,6 +410,10 @@ static void wpa_driver_nl80211_event_rtm
  4. return;
  5. }
  6. + if (ifi->ifi_family == AF_BRIDGE &&
  7. + drv->nlmode != NL80211_IFTYPE_AP)
  8. + return;
  9. +
  10. wpa_printf(MSG_DEBUG, "RTM_NEWLINK: operstate=%d ifi_flags=0x%x "
  11. "(%s%s%s%s)",
  12. drv->operstate, ifi->ifi_flags,
  13. @@ -481,6 +485,10 @@ static void wpa_driver_nl80211_event_rtm
  14. attrlen = len;
  15. attr = (struct rtattr *) buf;
  16. + if (ifi->ifi_family == AF_BRIDGE &&
  17. + drv->nlmode != NL80211_IFTYPE_AP)
  18. + return;
  19. +
  20. rta_len = RTA_ALIGN(sizeof(struct rtattr));
  21. while (RTA_OK(attr, attrlen)) {
  22. if (attr->rta_type == IFLA_IFNAME) {
  23. @@ -1347,6 +1355,11 @@ static int wpa_driver_nl80211_init_nl(st
  24. eloop_register_read_sock(nl_socket_get_fd(drv->nl_handle_event),
  25. wpa_driver_nl80211_event_receive, drv, ctx);
  26. +#ifdef HOSTAPD
  27. + drv->num_if_indices = sizeof(drv->default_if_indices) / sizeof(int);
  28. + drv->if_indices = drv->default_if_indices;
  29. +#endif
  30. +
  31. return 0;
  32. err4:
  33. @@ -4867,8 +4880,6 @@ static void *i802_init(struct hostapd_da
  34. br_ifindex = 0;
  35. }
  36. - drv->num_if_indices = sizeof(drv->default_if_indices) / sizeof(int);
  37. - drv->if_indices = drv->default_if_indices;
  38. for (i = 0; i < params->num_bridge; i++) {
  39. if (params->bridge[i]) {
  40. ifindex = if_nametoindex(params->bridge[i]);