|
@@ -1973,10 +1973,22 @@ bool batadv_bla_tx(struct batadv_priv *bat_priv, struct sk_buff *skb,
|
|
|
/* if yes, the client has roamed and we have
|
|
|
* to unclaim it.
|
|
|
*/
|
|
|
- batadv_handle_unclaim(bat_priv, primary_if,
|
|
|
- primary_if->net_dev->dev_addr,
|
|
|
- ethhdr->h_source, vid);
|
|
|
- goto allow;
|
|
|
+ if (batadv_has_timed_out(claim->lasttime, 100)) {
|
|
|
+ /* only unclaim if the last claim entry is
|
|
|
+ * older than 100 ms to make sure we really
|
|
|
+ * have a roaming client here.
|
|
|
+ */
|
|
|
+ batadv_dbg(BATADV_DBG_BLA, bat_priv, "bla_tx(): Roaming client %pM detected. Unclaim it.\n",
|
|
|
+ ethhdr->h_source);
|
|
|
+ batadv_handle_unclaim(bat_priv, primary_if,
|
|
|
+ primary_if->net_dev->dev_addr,
|
|
|
+ ethhdr->h_source, vid);
|
|
|
+ goto allow;
|
|
|
+ } else {
|
|
|
+ batadv_dbg(BATADV_DBG_BLA, bat_priv, "bla_tx(): Race for claim %pM detected. Drop packet.\n",
|
|
|
+ ethhdr->h_source);
|
|
|
+ goto handled;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/* check if it is a multicast/broadcast frame */
|