Commit cb27593ce0 for strongswan.org

commit cb27593ce0ef0003f69ee57333621e4f4eb35e11
Author: Tobias Brunner <tobias@strongswan.org>
Date:   Wed Mar 18 13:00:18 2026 +0100

    kernel-netlink: Update family in SA selector if addresses change

diff --git a/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c b/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c
index 810b07e61c..0f0e33b725 100644
--- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c
+++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c
@@ -2723,6 +2723,9 @@ METHOD(kernel_ipsec_t, update_sa, status_t,
 		{
 			ts->set_address(ts, data->new_dst);
 			ts2subnet(ts, &sa->sel.daddr, &sa->sel.prefixlen_d);
+			/* can't set this for src, otherwise selector2ts() will fail, but
+			 * if the family changes, both addresses need updating anyway */
+			sa->sel.family = data->new_dst->get_family(data->new_dst);
 		}
 		DESTROY_IF(ts);
 	}