From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id A9C905A0082 for ; Thu, 3 Nov 2022 04:09:32 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4N2pdM19B8z4xwl; Thu, 3 Nov 2022 14:09:27 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1667444967; bh=9yd6SqETu2kDa3p5uTV5/XXDAdsG3jQw1jxF4l+vDp0=; h=From:To:Cc:Subject:Date:From; b=SZ2IQOVXl2+K+Pv0RstGom39FxO9+1XK7RoPALI+2gjsJ9uAMxnZ7kIaAhgKV7E6+ +0sgMhdRWlaqz7U8iC5PLQVULh2dOs9Z7pzYHMpMHUTinO+EL0D7vDsBgJbtL10SVl 0ak2wQoGJrIbQopcuYvGkR2vRkHnFqZ8jKD3D3JY= From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH 0/4] Improve IPv4 address endian handling and related bug fixes Date: Thu, 3 Nov 2022 14:09:21 +1100 Message-Id: <20221103030925.2561571-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.38.1 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: UOYE7Z3IWRKL4ABXS3OWKZR4FZHLORC2 X-Message-ID-Hash: UOYE7Z3IWRKL4ABXS3OWKZR4FZHLORC2 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.3 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: While working on allowing us to use IPv4/IPv6 combined listening sockets, I made several endian mistakes. So, I took a diversion to make it harder to make such mistakes. Along the way I found some small existing endian and other bugs in IPv4 address handling. David Gibson (4): Correct some missing endian conversions of IPv4 addresses Minor improvements to IPv4 netmask handling Use IPV4_IS_LOOPBACK more widely Use typing to reduce chances of IPv4 endianness errors checksum.c | 7 ++-- checksum.h | 3 +- conf.c | 118 ++++++++++++++++++++++++++++++----------------------- dhcp.c | 15 ++++--- icmp.c | 5 +-- passt.c | 2 +- passt.h | 16 ++++---- pasta.c | 7 +--- tap.c | 18 ++++---- tap.h | 8 ++-- tcp.c | 48 +++++++++++----------- tcp.h | 2 +- udp.c | 30 +++++++------- udp.h | 2 +- util.h | 12 +++++- 15 files changed, 160 insertions(+), 133 deletions(-) -- 2.38.1