Skip to content

Acks are never dropped #11

@jprestwo

Description

@jprestwo

I noticed that regardless of signal strength or packet drop the clients always remain connected. This is because every frame sent is automatically acked to the kernel and never passes through vwifi-server (ckernelwifi.cc):

/* this has to be an ack the driver expects */
/* what does the driver do with these values? can i remove them? */
send_tx_info_frame_nl(src, flags, signal, tx_rates, cookie);

The TX_INFO message is specific to mac80211_hwsim but roughly corresponds to TX_STATUS in the wireless subsystem. For this specific case sending the TX_INFO message tells mac80211_hwsim that the destination acked the frame. So whats happening is the client is sending the frame and its always reporting an ack even if the server drops it. This keeps the connection alive even if 100% of packets are dropped since the stations think the APs are responding to their frames.

One suggestion would be to send the TX_INFO messages across the server and have each client send the TX_INFO response when they receive it. This is how wifi actually works over the air:

Client A             vwifi-server             Client B
   |------ Frame ------> | -------- Frame ----> |
   |                     |                      |
   | <----- TxInfo ------| <------- TxInfo ---- | 

The problem then comes with dropping frames because the TX_INFO still needs to be sent with the ACK flag unset. Since the server sends all frames to all clients it has no idea which client is the real destination so its difficult to send a single TX_INFO frame back to the source if the server decided to drop it. To support this either the server would need to track MACs of each client or put the dropping logic onto the client as opposed to the server, e.g. send the frame regardless and if the client drops it the client can send back the appropriate TX_INFO (ack=1 or ack=0).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions