From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dvalin.narfation.org (dvalin.narfation.org [213.160.73.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 34FF93F9F22 for ; Fri, 26 Jun 2026 16:10:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.160.73.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782490220; cv=none; b=TNgxDuZ/5u/YMWeleLOtqQGRoH4W4Kwifl81ARy+dtVIVAWsMuwdPoEXnz+eKARnyKtvJHO0JfyVAOLuYoxrDbMnm94QqAq+jAJW7l2RfoNU2PNvoUDj4mtqa7585BSng6cYg3qNGgjRoahBgwwLYMT7XXqBbOQ5nkqj7Mac9Yc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782490220; c=relaxed/simple; bh=8rojb5sAJVGXrQxPsYaAwBG51U1p+ku7SbFwbyU5WAc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Yg/MlwEI6VkhGOy7MzI8rzxycUS8jbigW2EXlz0WwcmfZ3J5GA8dCsBD6XDB8IYyvW8PsvKu8GYyfYjvznur4fWqY2tg3WOEP3MdT1yNPbUo50lvK4So1v8d4ux1WUQg6Pef8jXfJV9IbL99vNDsXqwXXanPz5supnmXnhYgvjE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=narfation.org; spf=pass smtp.mailfrom=narfation.org; dkim=pass (1024-bit key) header.d=narfation.org header.i=@narfation.org header.b=OoTuTJmN; arc=none smtp.client-ip=213.160.73.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=narfation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=narfation.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=narfation.org header.i=@narfation.org header.b="OoTuTJmN" Received: by dvalin.narfation.org (Postfix) id 941F420741; Fri, 26 Jun 2026 16:10:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=narfation.org; s=20121; t=1782490202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Q/lQbNX+Dq/+3vS01mxo4SnXtTr806jZlmuJS4GX/VM=; b=OoTuTJmNc+FmzdVX3zRaLIM0nkzcC9Zn/XINkglnBT8OYAw50ln+xB+NLjTmGw75XQqU3+ FhgQJomeRRnf8tr0SJBpV96T5LLffuYkFQY2pCt409oDbIpM+Vqb7Du97RcKC1ARfwmiM4 CVtlYta2WOjAjdmYdBO+no24h3+YCHY= From: Sven Eckelmann To: stable@vger.kernel.org Cc: Sven Eckelmann Subject: [PATCH 5.10 19/23] batman-adv: tt: don't merge change entries with different VIDs Date: Fri, 26 Jun 2026 18:09:48 +0200 Message-ID: <20260626160952.123713-20-sven@narfation.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260626160952.123713-1-sven@narfation.org> References: <20260626160952.123713-1-sven@narfation.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit commit f08e06c2d5c3e2434e7c773f2213f4a7dce6bc1e upstream. batadv_tt_local_event() merges/cancels events for the same client which would conflict or be duplicates. The matching of the queued events only compares the MAC address - the VLAN ID stored in each event is ignored. If a MAC would now appear on multiple VID, the two ADD change events (for VID 1 and VID 2) would be merged to a single vid event. The remote can therefore not calculate the correct TT table and desync. A full translation table exchange is required to recover from this state. A check of VID is therefore necessary to avoid such wrong merges/cancels. Cc: stable@kernel.org Fixes: c018ad3de61a ("batman-adv: add the VLAN ID attribute to the TT entry") [ Context ] Signed-off-by: Sven Eckelmann --- net/batman-adv/translation-table.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index 79da90b9cf065..c323660897d43 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@ -486,6 +486,9 @@ static void batadv_tt_local_event(struct batadv_priv *bat_priv, if (!batadv_compare_eth(entry->change.addr, common->addr)) continue; + if (entry->change.vid != tt_change_node->change.vid) + continue; + /* DEL+ADD in the same orig interval have no effect and can be * removed to avoid silly behaviour on the receiver side. The * other way around (ADD+DEL) can happen in case of roaming of -- 2.47.3