From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE92AC433FE for ; Fri, 29 Apr 2022 15:31:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378484AbiD2PeT (ORCPT ); Fri, 29 Apr 2022 11:34:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346797AbiD2PeS (ORCPT ); Fri, 29 Apr 2022 11:34:18 -0400 Received: from 1wt.eu (wtarreau.pck.nerim.net [62.212.114.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6B870DEC; Fri, 29 Apr 2022 08:30:59 -0700 (PDT) Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 23TFUoWs012305; Fri, 29 Apr 2022 17:30:50 +0200 Date: Fri, 29 Apr 2022 17:30:50 +0200 From: Willy Tarreau To: "Jason A. Donenfeld" Cc: Netdev , David Miller , Jakub Kicinski , Eric Dumazet , Moshe Kol , Yossi Gilad , Amit Klein , LKML Subject: Re: [PATCH v2 net 3/7] tcp: resalt the secret every 10 seconds Message-ID: <20220429153050.GD11224@1wt.eu> References: <20220428124001.7428-1-w@1wt.eu> <20220428124001.7428-4-w@1wt.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 29, 2022 at 04:48:52PM +0200, Jason A. Donenfeld wrote: > On Thu, Apr 28, 2022 at 2:40 PM Willy Tarreau wrote: > > @@ -101,10 +103,12 @@ u64 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, > > struct in6_addr saddr; > > struct in6_addr daddr; > > __be16 dport; > > + unsigned int timeseed; > > Also, does the struct packing (or lack thereof) lead to problems here? > Uninitialized bytes might not make a stable hash. Hmmm, I didn't notice, and I think you're right indeed. I did test in IPv6 without noticing any problem but it doesn't mean that the hash is perfectly stable. I'll send an update for this one, thank you! Willy