From patchwork Wed May 15 09:48:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "plaisthos (Code Review)" X-Patchwork-Id: 3711 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:1443:b0:57d:b2cb:6cf with SMTP id q3csp1079551man; Wed, 15 May 2024 02:48:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUUa6K+kW4oDbWYPvOINYit99wo1L63AdGxk881p0KbM5AxzpdF77MJ1fogW3gXmRPUq7qPZ59gzpklvRlx9HY3W5/XTNg= X-Google-Smtp-Source: AGHT+IHCePusCRU6x2CSHgLjWcTCWZHfWP7Ej+U18p2IbqRFB5fXNP0h+gltjDIpbVtntMiDHG4M X-Received: by 2002:a92:c142:0:b0:36c:4bce:5003 with SMTP id e9e14a558f8ab-36cc14e65a1mr137126835ab.3.1715766530952; Wed, 15 May 2024 02:48:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715766530; cv=none; d=google.com; s=arc-20160816; b=sAFDlDD2H2qTxrh3kcVruH3ZC1NmsO9jUVghHEPDDgXm4OyN+oC1qz1jBZn8poVuIx pYTecUU8gLFV5v26Ix2cSgGQ+YNxKUM6xTZmg31ukn0wTG7fP3doYvyf1MBSGsNaQXav /R/g1/WY4qLsiLb9M7JG89SBgoUOyvVLJOW6AUsYuCaqXSnYcTqdFtxiOAp6KiVd+GQu qa2rWqY6nEQtbQiJVm71teWzgxhHBJlIocEgnnk/XJDsYtl12/GclKGGCZ6tvd6WslMz i31EE+ddMznzJsfMvoQ/pWl2h0OXvgN1S6R8EH2RX01qHaL92DWaPxs1SiTcSIhgiTgm lKFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :mime-version:message-id:references:auto-submitted:to:date:from :dkim-signature:dkim-signature:dkim-signature; bh=92mQ9AHuNbDewPJbWsauS9pWMOBL/vpKI34rq2sEW9Y=; fh=lm0MLPW7DntlrDqRECIiC9JlE1uPxhepE0URYHIf+eE=; b=vQh1MIcE0TDPuaCgqdDrbsrxF/IH+ht7OGMvdFXEJjXyFT2rb90DEavb4f0p6tpfSE jPcK5XIfiSHl8/RyMn0RpDAQJnGkcG4Q0voNjQzZTz7G7QA/GbXt320XI1pV10fffhlw GH6SeQ2DJveOh7R+f5JssAjaY87mqDw7aDg/VwembwEpF8F2/hCpoHZCEg9lv8a1R8TY A37R91AkT1PEm1dmlulknVQDOQ2iozw3EtM1WZWtLeGf8iGHYj3cAjA4PIu8r/ZorZrZ oSdnRQgFZbMBZwUzqIuawbBChVA4fA9kxims7VBb5cZyjfsF+WlffGJ4BvapwntJ0zkL 9ibw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=C2Fg5J9Q; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=kxaoKMAG; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=LEXker4K; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvpn.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 41be03b00d2f7-63412e1efd3si13122185a12.758.2024.05.15.02.48.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 May 2024 02:48:50 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=C2Fg5J9Q; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=kxaoKMAG; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=LEXker4K; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvpn.net Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1s7BFH-0000Wz-W5; Wed, 15 May 2024 09:48:24 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1s7BFE-0000Wq-Nc for openvpn-devel@lists.sourceforge.net; Wed, 15 May 2024 09:48:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Message-ID:Reply-To:References:Subject:List-Unsubscribe:List-Id:Cc:To:Date: From:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help: List-Subscribe:List-Post:List-Owner:List-Archive; bh=WpqzBpt3darNRw6PnBN34oT5pLVb2Y2yrN69dtu7Un8=; b=C2Fg5J9QVRkO1DP1gWxXmYFLbO Z5UMMUDOkksRWPs5yUvsZ4koeVDBy93HswUIHHtbXyxCyDXrj3HoxveO/j9dFC3Kj4LDrcFUbZ/bX Sr9K4f76Of+PIcWyxaQGCoL8NMduEvn0Rjkz8dGjDgBPJEp9TaI2b+Gr+I+LkIJ8emG8=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Reply-To: References:Subject:List-Unsubscribe:List-Id:Cc:To:Date:From:Sender:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help:List-Subscribe:List-Post: List-Owner:List-Archive; bh=WpqzBpt3darNRw6PnBN34oT5pLVb2Y2yrN69dtu7Un8=; b=k xaoKMAG/cTuuQ9nh5pN+6a1nDXE0s6CbISFyYHSsBDSOioj/m+ir81985wdt761vxDNnTSaPaTOoh iwIHVyygyU4KQC5cm6dNTvDrRHSznxSXjEcjbUNrm6RZB0fNJVJfRJaJcqrg4M1rtB4WkFm2zMt9Z /mysziQeFIbgCe3Y=; Received: from mail-wm1-f49.google.com ([209.85.128.49]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1s7BFE-0005WZ-PA for openvpn-devel@lists.sourceforge.net; Wed, 15 May 2024 09:48:21 +0000 Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-41ffad2426eso49903345e9.3 for ; Wed, 15 May 2024 02:48:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1715766488; x=1716371288; darn=lists.sourceforge.net; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=WpqzBpt3darNRw6PnBN34oT5pLVb2Y2yrN69dtu7Un8=; b=LEXker4KPN+3jLccYzcGi14oYs2J+5bKiLh1sYQlNc1CDodazeCA6HjsIqT5ihSc5M Q3qjmYAMOQJPhSYYbdoUiTKFyBB46Fa//3wD6Xall3UNK4yOWmcXKe8BIXGNrtXdrO/D 1sfzdu0h1OtZM9V1C340lgRRLdiET+r8mEUlh9bU+fDqk/8BTWR8FCvGg+UcO3QE7hPk BF1zAFGCmNHkBuICHz7N5PIIk4u9wHEQS5r/GPqY7LAgvfAFFvZg8MKA5Oyrxo24D3No 7Y30kldGMCq/0//fcKkDkO7GPv7VDPrHrH5dd0FSyMxkg+D+jO3yjGPX9naTM3EXuXSA i6ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715766488; x=1716371288; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WpqzBpt3darNRw6PnBN34oT5pLVb2Y2yrN69dtu7Un8=; b=VFOPyZFu2F7CaE6NZSfOJcVZs+WPdo7+ke7kKJk/34GOmLcmXbY7xmCIP/PQByu9Cy RbRRJHDz5XOEjigrRTl+yhP7DyqRQFZkIpWRXS0XPHCguc/ETNFAhQ8RYB/14k6pRqZ6 xCDzMI8dz/m4BOX6ZxJdQW3w4rnby7bJthhWx2bBh6SjzZEbGk0a8YhIOePh/EopQtdy 0yblydNKKhbHOIwmW/pg1PyhmCMnefG2vqdYWzLs4izW+VeCGVaQMQyr1800WRr0xyUp uUXPcSTGPxil+q1BAP7n+4tPwGTwxqQasQO4NJjqxwlxfWnXzGlC0S4YzoGHHVT9l8hD T7zw== X-Gm-Message-State: AOJu0YzxvYnMh/sLooCmaupZH7PujjGlFsXiYKdtDUaX6yryNGAGQQSR esfNRCXNDvUTDWPUTw+KSEeulxtHIEhyOP4XisIg5SOrn0YYsVvhAkWMn0Zb3YBVZyZ2biAcZbI p X-Received: by 2002:a05:600c:3114:b0:418:a706:3209 with SMTP id 5b1f17b1804b1-41feac55e6emr165126015e9.31.1715766487980; Wed, 15 May 2024 02:48:07 -0700 (PDT) Received: from gerrit.openvpn.in (ec2-18-159-0-78.eu-central-1.compute.amazonaws.com. [18.159.0.78]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41f9ffe26acsm174049345e9.1.2024.05.15.02.48.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 02:48:07 -0700 (PDT) From: "plaisthos (Code Review)" X-Google-Original-From: "plaisthos (Code Review)" X-Gerrit-PatchSet: 1 Date: Wed, 15 May 2024 09:48:07 +0000 To: flichtenheld Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-Change-Id: I1ef5f6f21f0135a628a63553c39515fa4549ce87 X-Gerrit-Change-Number: 588 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: 461a2fb5eb5e4b60ddcd84300e655e4a4df93040 References: Message-ID: <957a8e1829b1d1e7827be18b0a46d10fa8d65958-HTML@gerrit.openvpn.net> MIME-Version: 1.0 User-Agent: Gerrit/3.8.2 X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Attention is currently required from: flichtenheld. Hello flichtenheld, I'd like you to do a code review. Please visit Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: cmake.in] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.49 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.49 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 WEIRD_PORT URI: Uses non-standard port number for HTTP 0.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.0 T_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML X-Headers-End: 1s7BFE-0005WZ-PA Subject: [Openvpn-devel] [S] Change in openvpn[master]: Remove check for anonymous unions from configure and cmake config X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: arne-openvpn@rfc2549.org, openvpn-devel@lists.sourceforge.net, frank@lichtenheld.com Cc: openvpn-devel Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1799111606051097575?= X-GMAIL-MSGID: =?utf-8?q?1799111606051097575?= X-getmail-filter-classifier: gerrit message type newchange Attention is currently required from: flichtenheld. Hello flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/588?usp=email to review the following change. Change subject: Remove check for anonymous unions from configure and cmake config ...................................................................... Remove check for anonymous unions from configure and cmake config Anonymous unions/structs are technically a custom GNU C99 feature but was already widely supported by other compilers. With C11 this feature has become a standard feature so all compilers nowadays support it. Change-Id: I1ef5f6f21f0135a628a63553c39515fa4549ce87 Signed-off-by: Arne Schwabe --- M config.h.cmake.in M configure.ac M src/openvpn/mroute.h 3 files changed, 1 insertion(+), 36 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/88/588/1 diff --git a/config.h.cmake.in b/config.h.cmake.in index 2cdfdcc..a4f0893 100644 --- a/config.h.cmake.in +++ b/config.h.cmake.in @@ -65,9 +65,6 @@ /* Enable --x509-username-field feature */ #cmakedefine ENABLE_X509ALTUSERNAME -/* Compiler supports anonymous unions */ -#define HAVE_ANONYMOUS_UNION_SUPPORT - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_ARPA_INET_H 1 diff --git a/configure.ac b/configure.ac index 965ed1a..5f72029 100644 --- a/configure.ac +++ b/configure.ac @@ -564,28 +564,6 @@ , [[${SOCKET_INCLUDES}]] ) -AC_MSG_CHECKING([anonymous union support]) -AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ - struct mystruct { - union { - int m1; - char m2; - }; - }; - ]], - [[ - struct mystruct s; - s.m1 = 1; s.m2 = 2; - ]] - )], - [ - AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_ANONYMOUS_UNION_SUPPORT], [], [Compiler supports anonymous unions]) - ], - [AC_MSG_RESULT([no])] -) saved_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -Wl,--wrap=exit" diff --git a/src/openvpn/mroute.h b/src/openvpn/mroute.h index bc58493..8b457d4 100644 --- a/src/openvpn/mroute.h +++ b/src/openvpn/mroute.h @@ -96,17 +96,7 @@ uint8_t prefix[12]; in_addr_t addr; /* _network order_ IPv4 address */ } v4mappedv6; - } -#ifndef HAVE_ANONYMOUS_UNION_SUPPORT -/* Wrappers to support compilers that do not grok anonymous unions */ - mroute_union -#define raw_addr mroute_union.raw_addr -#define ether mroute_union.ether -#define v4 mroute_union.v4 -#define v6 mroute_union.v6 -#define v4mappedv6 mroute_union.v4mappedv6 -#endif - ; + }; }; /* Double-check that struct packing works as expected */