From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202502 header.b=aj5YXfO8; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id EC0A15A061A for ; Wed, 19 Mar 2025 06:14:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202502; t=1742361265; bh=/zMpZKXAJxwjmKVTl137QWBiltWWFnBgpwCrbIMrddE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aj5YXfO8bXsbgNJLeqNnYc41LJkOM+yzMC3kjHiTKahQ6ME29aRejvnCNyBkcCx6J PIRxtKop8mRL5L7elvjd8Ok/mEKdbcDRsPmlhaFYLTv4aZwmeOcECdfFadsBbqgtUx AcF0sVQCwYlFHniWDHzM3XjpG6TjUuMobX5T9bceBC/xJoH/fBF8MF/q1Q8ScZeAQ1 +5I3EnBxdUl5b75p1ggAj2+seCISfwfsB48tnXwM8+b8wwZqCOC+ArCacKJmMf2sjE 9PQBTeOInsFTQlOhrLMyZ5GErOW7G2iAOkj82yl9R0HneA9tR7NlFseK8q2NafHYUt RkN6FwjdQ98gg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4ZHcMP1CzWz4x3p; Wed, 19 Mar 2025 16:14:25 +1100 (AEDT) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH 3/3] migrate: Bump migration version number Date: Wed, 19 Mar 2025 16:14:23 +1100 Message-ID: <20250319051423.2378689-4-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250319051423.2378689-1-david@gibson.dropbear.id.au> References: <20250319051423.2378689-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: VX3HLGOIXPVVZ2QPIR5OBPYTLCRLDIAI X-Message-ID-Hash: VX3HLGOIXPVVZ2QPIR5OBPYTLCRLDIAI X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: v1 of the migration stream format, had some flaws: it didn't properly handle endianness of the MSS field, and it didn't transfer the RFC7323 timestamp. We've now fixed those bugs, but it requires incompatible changes to the stream format. Because of the timestamps in particular, v1 is not really usable, so there is little point maintaining compatible support for it. However, v1 is in released packages, both upstream and downstream (RHEL at least). Just updating the stream format without bumping the version would lead to very cryptic errors if anyone did attempt to migrate between an old and new passt. So, bump the migration version to v2, so we'll get a clear error message if anyone attempts this. We don't attempt to maintain backwards compatibility with v1, however: we'll simply fail if given a v1 stream. Signed-off-by: David Gibson --- migrate.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/migrate.c b/migrate.c index 0fca77b7..48d63a07 100644 --- a/migrate.c +++ b/migrate.c @@ -96,8 +96,8 @@ static int seen_addrs_target_v1(struct ctx *c, return 0; } -/* Stages for version 1 */ -static const struct migrate_stage stages_v1[] = { +/* Stages for version 2 */ +static const struct migrate_stage stages_v2[] = { { .name = "observed addresses", .source = seen_addrs_source_v1, @@ -118,7 +118,11 @@ static const struct migrate_stage stages_v1[] = { /* Supported encoding versions, from latest (most preferred) to oldest */ static const struct migrate_version versions[] = { - { 1, stages_v1, }, + { 2, stages_v2, }, + /* v1 was released, but not widely used. It had bad endianness for the + * MSS and omitted timestamps, which meant it usually wouldn't work. + * Therefore we don't attempt to support compatibility with it. + */ { 0 }, }; -- 2.48.1