WNM: Send empty IPv4 packet as keep-alive for now

Use an empty IPv4 packet as the keep-alive packet for WNM BSS max idle
period mechanism. This is not really the best possible frame to use for
this, but for now, it can do until a more suitable frame is figured out
for this (e.g., special LLC header to indicate link test purposes).

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2012-05-28 14:36:23 -07:00
parent 8bd0fc0e0c
commit f5d4dd5ad4

View file

@ -1211,10 +1211,12 @@ static void wnm_bss_keep_alive(void *eloop_ctx, void *sock_ctx)
if (wpa_s->wpa_state < WPA_ASSOCIATED)
return;
wpa_printf(MSG_DEBUG, "WNM: Send keep-alive");
wpa_printf(MSG_DEBUG, "WNM: Send keep-alive to AP " MACSTR,
MAC2STR(wpa_s->bssid));
/* TODO: could skip this if normal data traffic has been sent */
/* TODO: send keep alive frame - better use some short unicast data
* frame that gets protected if PTK is set */
/* TODO: Consider using some more appropriate data frame for this */
if (wpa_s->l2)
l2_packet_send(wpa_s->l2, wpa_s->bssid, 0x0800, (u8 *) "", 0);
#ifdef CONFIG_SME
if (wpa_s->sme.bss_max_idle_period) {