From patchwork Tue Nov 28 11:06:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Klauser X-Patchwork-Id: 1869249 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SffmQ6Y7Cz1yS6 for ; Tue, 28 Nov 2023 22:07:02 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 19B8C3865C32 for ; Tue, 28 Nov 2023 11:07:00 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sym2.noone.org (sym.noone.org [178.63.92.236]) by sourceware.org (Postfix) with ESMTPS id 887333858033 for ; Tue, 28 Nov 2023 11:06:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 887333858033 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=distanz.ch Authentication-Results: sourceware.org; spf=none smtp.mailfrom=sym.noone.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 887333858033 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=178.63.92.236 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701169607; cv=none; b=WSjMxGEkx1uo5MoUD7MfFC7rW2XzmWja5cTrotIwmksja02kH5r0b4AqMU0trJ8FGuCZZk9RfLCcBfJaWnBq/z4u508asGMyY6LEXs4IPR2cFQ681VxfpEg1PeTWFSnFh7qTJiQ1VkCyUMqU+X7rtF7eMibuPdhNqv+gAehWzHw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701169607; c=relaxed/simple; bh=Fd07F5bU8yUQQ1RTFGr/mKGu6UYZa3bPEQUjKTmlxCQ=; h=From:To:Subject:Date:Message-Id; b=wqyN5ubm74KiHo45mUH2rsrqlP+JJGvtO+2TbEihG8nQ9mnvdo1gqFeq07XGYnEI/h9Wz2/EzNpVYIisIIy4d2BLnEuvxl/YNfLDjFe7VJe9mJ4kghfrbBWD2fChG5L3vNMGz6oVeD33nGLju1dPBE1Uvmfc0KzdBoRL8lNoo+w= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by sym2.noone.org (Postfix, from userid 1002) id 4Sffm40rcczvjfm; Tue, 28 Nov 2023 12:06:43 +0100 (CET) From: Tobias Klauser To: libc-alpha@sourceware.org Subject: [PATCH] Add TCP_MD5SIG_FLAG_IFINDEX from Linux 5.6 to netinet/tcp.h. Date: Tue, 28 Nov 2023 12:06:43 +0100 Message-Id: <20231128110643.16966-1-tklauser@distanz.ch> X-Mailer: git-send-email 2.11.0 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_NONE, SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org This patch adds the TCP_MD5SIG_FLAG_IFINDEX constant from Linux 5.6 to sysdeps/gnu/netinet/tcp.h and updates struct tcp_md5sig accordingly to contain the device index. Reviewed-by: Florian Weimer --- sysdeps/gnu/netinet/tcp.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/gnu/netinet/tcp.h b/sysdeps/gnu/netinet/tcp.h index 17937246428e..b2acbb435082 100644 --- a/sysdeps/gnu/netinet/tcp.h +++ b/sysdeps/gnu/netinet/tcp.h @@ -272,6 +272,7 @@ struct tcp_info /* tcp_md5sig extension flags for TCP_MD5SIG_EXT. */ #define TCP_MD5SIG_FLAG_PREFIX 1 /* Address prefix length. */ +#define TCP_MD5SIG_FLAG_IFINDEX 2 /* Ifindex set. */ struct tcp_md5sig { @@ -279,7 +280,7 @@ struct tcp_md5sig uint8_t tcpm_flags; /* Extension flags. */ uint8_t tcpm_prefixlen; /* Address prefix. */ uint16_t tcpm_keylen; /* Key length. */ - uint32_t __tcpm_pad; /* Zero. */ + int tcpm_ifindex; /* Device index for scope. */ uint8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* Key (binary). */ };