730-ft_iface.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From: Felix Fietkau <[email protected]>
  2. Date: Fri, 4 Jun 2021 09:12:07 +0200
  3. Subject: [PATCH] hostapd: configure inter-AP communication interface for
  4. 802.11r
  5. In setups using VLAN bridge filtering, hostapd may need to communicate using
  6. a VLAN interface on top of the bridge, instead of using the bridge directly
  7. --- a/hostapd/config_file.c
  8. +++ b/hostapd/config_file.c
  9. @@ -3200,6 +3200,8 @@ static int hostapd_config_fill(struct ho
  10. wpa_printf(MSG_INFO,
  11. "Line %d: Obsolete peerkey parameter ignored", line);
  12. #ifdef CONFIG_IEEE80211R_AP
  13. + } else if (os_strcmp(buf, "ft_iface") == 0) {
  14. + os_strlcpy(bss->ft_iface, pos, sizeof(bss->ft_iface));
  15. } else if (os_strcmp(buf, "mobility_domain") == 0) {
  16. if (os_strlen(pos) != 2 * MOBILITY_DOMAIN_ID_LEN ||
  17. hexstr2bin(pos, bss->mobility_domain,
  18. --- a/src/ap/ap_config.h
  19. +++ b/src/ap/ap_config.h
  20. @@ -283,6 +283,7 @@ struct airtime_sta_weight {
  21. struct hostapd_bss_config {
  22. char iface[IFNAMSIZ + 1];
  23. char bridge[IFNAMSIZ + 1];
  24. + char ft_iface[IFNAMSIZ + 1];
  25. char vlan_bridge[IFNAMSIZ + 1];
  26. char wds_bridge[IFNAMSIZ + 1];
  27. int bridge_hairpin; /* hairpin_mode on bridge members */
  28. --- a/src/ap/wpa_auth_glue.c
  29. +++ b/src/ap/wpa_auth_glue.c
  30. @@ -1777,8 +1777,12 @@ int hostapd_setup_wpa(struct hostapd_dat
  31. wpa_key_mgmt_ft(hapd->conf->wpa_key_mgmt)) {
  32. const char *ft_iface;
  33. - ft_iface = hapd->conf->bridge[0] ? hapd->conf->bridge :
  34. - hapd->conf->iface;
  35. + if (hapd->conf->ft_iface[0])
  36. + ft_iface = hapd->conf->ft_iface;
  37. + else if (hapd->conf->bridge[0])
  38. + ft_iface = hapd->conf->bridge;
  39. + else
  40. + ft_iface = hapd->conf->iface;
  41. hapd->l2 = l2_packet_init(ft_iface, NULL, ETH_P_RRB,
  42. hostapd_rrb_receive, hapd, 1);
  43. if (!hapd->l2) {