From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 65E5427B320; Mon, 22 Sep 2025 19:38:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758569884; cv=none; b=DTsrtRXWb3pq7DFB2buSG+9tMA7BlxZ4eOZLi2De1pbC8V60NMSigv7D39X6e5D2iPMGrb8yhuI0mDUm1hXA49mDsrAkB1W4YcaKCdUtHSk8W526neZKtgjfP05pIDORMw2o7kDfGDRpm8h+dJFxTh27G5sn9kOtKpjfCjIDA50= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758569884; c=relaxed/simple; bh=1bU0VlgmipZYlam4RahH16yrrJExF/DB6YAQHCKCybw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=A3oYNNr+C1ig0MvlLafEJo/FQNfWrmkB1eWQHniu25fZ/j1rJjlTzJUHU5qdtycvE2ec90ZWm1xJUEQintUUFQ904DZDRfqP+kVBwlwpIjRp79irtvs6xakzBvvujhX2G331KpHCwixqOKDOapYhQiYtviUz9rST6QKKu6wLM0U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MLVnbL0L; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="MLVnbL0L" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97C29C4CEF0; Mon, 22 Sep 2025 19:38:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758569881; bh=1bU0VlgmipZYlam4RahH16yrrJExF/DB6YAQHCKCybw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MLVnbL0LnMyhoDonriGnZWGPEQfmktFv919yx3gPI5o6Y8l5wtDLX9pphQ/ZnOj1h 6ZFZTNunEpJEVk7Zvvtp6dzp8457FDuJPFYuz/aIk/1kAUpX+tYPiabCKLiDnXWhCw TSp31xYigQ7k4Akn70WeD5/+496X0DZT7nqizoi4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, David Wilder , Jay Vosburgh , Hangbin Liu , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.12 025/105] bonding: dont set oif to bond dev when getting NS target destination Date: Mon, 22 Sep 2025 21:29:08 +0200 Message-ID: <20250922192409.572459564@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250922192408.913556629@linuxfoundation.org> References: <20250922192408.913556629@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Hangbin Liu [ Upstream commit a8ba87f04ca9cdec06776ce92dce1395026dc3bb ] Unlike IPv4, IPv6 routing strictly requires the source address to be valid on the outgoing interface. If the NS target is set to a remote VLAN interface, and the source address is also configured on a VLAN over a bond interface, setting the oif to the bond device will fail to retrieve the correct destination route. Fix this by not setting the oif to the bond device when retrieving the NS target destination. This allows the correct destination device (the VLAN interface) to be determined, so that bond_verify_device_path can return the proper VLAN tags for sending NS messages. Reported-by: David Wilder Closes: https://lore.kernel.org/netdev/aGOKggdfjv0cApTO@fedora/ Suggested-by: Jay Vosburgh Tested-by: David Wilder Acked-by: Jay Vosburgh Fixes: 4e24be018eb9 ("bonding: add new parameter ns_targets") Signed-off-by: Hangbin Liu Link: https://patch.msgid.link/20250916080127.430626-1-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/bonding/bond_main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 952737a98751e..00204e42de2e7 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -3338,7 +3338,6 @@ static void bond_ns_send_all(struct bonding *bond, struct slave *slave) /* Find out through which dev should the packet go */ memset(&fl6, 0, sizeof(struct flowi6)); fl6.daddr = targets[i]; - fl6.flowi6_oif = bond->dev->ifindex; dst = ip6_route_output(dev_net(bond->dev), NULL, &fl6); if (dst->error) { -- 2.51.0