From patchwork Tue Oct 8 01:52:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lev Stipakov X-Patchwork-Id: 848 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director8.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id oB40K/qGnF1+BwAAIUCqbw for ; Tue, 08 Oct 2019 08:54:18 -0400 Received: from proxy14.mail.ord1d.rsapps.net ([172.30.191.6]) by director8.mail.ord1d.rsapps.net with LMTP id cOEAK/qGnF1neQAAfY0hYg ; Tue, 08 Oct 2019 08:54:18 -0400 Received: from smtp32.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy14.mail.ord1d.rsapps.net with LMTP id aNS2KvqGnF0mTwAAtEH5vw ; Tue, 08 Oct 2019 08:54:18 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp32.gate.ord1d.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dkim=fail (signature verification failed) header.d=gmail.com; dmarc=fail (p=none; dis=none) header.from=gmail.com X-Suspicious-Flag: YES X-Classification-ID: bcbc5c6c-e9ca-11e9-bb4c-52540099eaf5-1-1 Received: from [216.105.38.7] ([216.105.38.7:44628] helo=lists.sourceforge.net) by smtp32.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 63/FD-21661-9F68C9D5; Tue, 08 Oct 2019 08:54:17 -0400 Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1iHozW-0001ym-KS; Tue, 08 Oct 2019 12:53:26 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1iHozV-0001yL-01 for openvpn-devel@lists.sourceforge.net; Tue, 08 Oct 2019 12:53:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=References:In-Reply-To:Message-Id:Date:Subject:To: From:Sender:Reply-To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=/F21AxHLlsfMnQJmj1XmEt7vjGQcozr/jLj/AeSdAOk=; b=i3rWnnEK1KnCli6WCcXXsPt0rU /jewFUZ6+fyXgjbCZVnl1ITV8k26iZAuOR5TuywOvIubyPx1yoAarkpPhuJUi0FuKhHKxwQ7UIySP CTPyDgOK11iVIAXENr2tT8wPWNrPoSAY/7qxrfB6FxDfPSDhy5HPGgdbr0DczOp42T2c=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc :MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=/F21AxHLlsfMnQJmj1XmEt7vjGQcozr/jLj/AeSdAOk=; b=fUeXw6x4h4SInAdUD5Gxk03KVB mNshZKaZrszsJ8NE5s+y+05g2HX4QjaLqdrrshvaFj1o1sDf8AR9a6VK+ctDawuDsIS7Ajj4pC0CB ZNhV7+H6LS8CwVovKMi0Rk0ybRlBLdRU0WCd3Mq4u4feLhVgcGYTA9VvZsySXQpqioM0=; Received: from mail-ed1-f67.google.com ([209.85.208.67]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1iHozT-009vbn-Re for openvpn-devel@lists.sourceforge.net; Tue, 08 Oct 2019 12:53:24 +0000 Received: by mail-ed1-f67.google.com with SMTP id f20so15496167edv.8 for ; Tue, 08 Oct 2019 05:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=/F21AxHLlsfMnQJmj1XmEt7vjGQcozr/jLj/AeSdAOk=; b=AHKRWqde24m1hO2PVYbjdONq82mhd9Cn1/6dkeCRQEw6Dp3InskYYE2Smmf6NfacJx uPSEhYXH/Dc02gRnNXM2bnMIkEDsJpqRiFJw5JnH+rBRswfe7ZiEA4ltCxmoL5uiiOvQ H/0ENM+GvMZ73ksZ3Kh94M1GBktpeynz0BvJGK10fWTfsjpELlCWFfcVelUIN/D8UEp0 c0wcWboz8+nl3dncmIzyCCpqcFe1ZyKmwP5QCkftARSFyS+OF8UNU99ebl+u11+iGChb KSMzSbyMn1bDMbPaNXvKvVXMNfRFsip+UG3mNzWZTy/MM4m0jB+UXILoaBwNi1797MvA joVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=/F21AxHLlsfMnQJmj1XmEt7vjGQcozr/jLj/AeSdAOk=; b=bndrhPWq4HKDh+VGRcgXhfeQGZGQeu626gkOyBZPb2J0FeqeVHkqbtR/GPwRSdNOsr WPWLg4rP64+H4z7+tKXjCpiZUJTLgYFElm665vvOMwcsoLY+X8BK5RrdTP3uEiuJ+vMf lFXSi51oqFWrGWe3AP+JrxhF68+SVKH+xdEdhXcDdLjjfnyVWKsnkwhYHrNbhIxBo2NV l2ATwkgsR3hQQZuepKb+Fzlv4xwzzEyZa5ePnIFe68xvVt72cS2ImEnPngSbOWB+vt9w IKGwdg0SpOM2jEuueRm8o0B+pj36HilOFw+E/GZTUhgMiWAJXLuMhosDPk6UvI2W3KEt firw== X-Gm-Message-State: APjAAAUPWWb4TMCmNqEqPDrwmkO4fg2lnxdgESNpQ46Z1+JsjlF3kxGH 8TCGvySDPtwbBWfcp3yNxWNOyWumOevThw== X-Google-Smtp-Source: APXvYqxDxr2MdSWihjPvEy+bttvZbP8sGwZIgEu70SOLIdXUBj+9Wbl8eM/G9hfzlZo+dGeoG0uUPQ== X-Received: by 2002:a17:906:fac5:: with SMTP id lu5mr28678572ejb.71.1570539196740; Tue, 08 Oct 2019 05:53:16 -0700 (PDT) Received: from stipakov.fi (stipakov.fi. [128.199.52.117]) by smtp.gmail.com with ESMTPSA id v8sm3931192edl.74.2019.10.08.05.53.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 08 Oct 2019 05:53:16 -0700 (PDT) From: Lev Stipakov To: openvpn-devel@lists.sourceforge.net Date: Tue, 8 Oct 2019 15:52:33 +0300 Message-Id: <1570539154-31784-1-git-send-email-lstipakov@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20191008124217.GI40538@greenie.muc.de> References: <20191008124217.GI40538@greenie.muc.de> X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 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: openvpn.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.67 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (lstipakov[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -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.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.67 listed in wl.mailspike.net] 0.0 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1iHozT-009vbn-Re Subject: [Openvpn-devel] [PATCH v2 1/2] push.c: fix Visual Studio build 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: , MIME-Version: 1.0 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox From: Lev Stipakov Visual Studio doesn't support empty designated initializers for C code, so use { 0 }. Also replace existing CLEAR() call with the new initializers. Signed-off-by: Lev Stipakov Acked-by: Gert Doering --- src/openvpn/push.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/openvpn/push.c b/src/openvpn/push.c index 49b9d1b..368b692 100644 --- a/src/openvpn/push.c +++ b/src/openvpn/push.c @@ -504,9 +504,8 @@ void send_push_reply_auth_token(struct tls_multi *multi) { struct gc_arena gc = gc_new(); + struct push_list push_list = { 0 }; - - struct push_list push_list = {}; prepare_auth_token_push_reply(multi, &gc, &push_list); /* prepare auth token should always add the auth-token option */ @@ -734,10 +733,9 @@ process_incoming_push_request(struct context *c) else { /* per-client push options - peer-id, cipher, ifconfig, ipv6-ifconfig */ - struct push_list push_list; + struct push_list push_list = { 0 }; struct gc_arena gc = gc_new(); - CLEAR(push_list); if (prepare_push_reply(c, &gc, &push_list) && send_push_reply(c, &push_list)) {