]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Report control port RX events
authorMarkus Theil <markus.theil@tu-ilmenau.de>
Fri, 3 Jan 2020 15:17:42 +0000 (16:17 +0100)
committerJouni Malinen <j@w1.fi>
Sun, 5 Jan 2020 19:30:41 +0000 (21:30 +0200)
This allows EAPOL frames to be received over the separate controlled
port once rest of the driver interface is ready for this. By itself,
this commit does not actually change behavior since cfg80211 will not be
delivering these events without them being explicitly requested.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
src/drivers/driver_nl80211_event.c

index 6c6e5c185d8928c8cc26a2e16262518fd2a749dc..22585fdb0f984c7afee69deea54bb414e3a7a9ae 100644 (file)
@@ -2448,6 +2448,18 @@ static void nl80211_sta_opmode_change_event(struct wpa_driver_nl80211_data *drv,
 }
 
 
+static void nl80211_control_port_frame(struct wpa_driver_nl80211_data *drv,
+                                      struct nlattr **tb)
+{
+       if (!tb[NL80211_ATTR_MAC] || !tb[NL80211_ATTR_FRAME])
+               return;
+
+       drv_event_eapol_rx(drv->ctx, nla_data(tb[NL80211_ATTR_MAC]),
+                          nla_data(tb[NL80211_ATTR_FRAME]),
+                          nla_len(tb[NL80211_ATTR_FRAME]));
+}
+
+
 static void do_process_drv_event(struct i802_bss *bss, int cmd,
                                 struct nlattr **tb)
 {
@@ -2663,6 +2675,9 @@ static void do_process_drv_event(struct i802_bss *bss, int cmd,
        case NL80211_CMD_UPDATE_OWE_INFO:
                mlme_event_dh_event(drv, bss, tb);
                break;
+       case NL80211_CMD_CONTROL_PORT_FRAME:
+               nl80211_control_port_frame(drv, tb);
+               break;
        default:
                wpa_dbg(drv->ctx, MSG_DEBUG, "nl80211: Ignored unknown event "
                        "(cmd=%d)", cmd);