From patchwork Sat Nov 9 05:37:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 898 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director12.mail.ord1d.rsapps.net ([172.31.255.6]) by backend30.mail.ord1d.rsapps.net with LMTP id IE4EKZzrxl1eIAAAIUCqbw for ; Sat, 09 Nov 2019 11:38:52 -0500 Received: from proxy15.mail.iad3b.rsapps.net ([172.31.255.6]) by director12.mail.ord1d.rsapps.net with LMTP id UCXXJpzrxl00HQAAIasKDg ; Sat, 09 Nov 2019 11:38:52 -0500 Received: from smtp40.gate.iad3b ([172.31.255.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy15.mail.iad3b.rsapps.net with LMTP id aF1uIZzrxl31YAAAhyf7VQ ; Sat, 09 Nov 2019 11:38:52 -0500 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: smtp40.gate.iad3b.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; dmarc=none (p=nil; dis=none) header.from=unstable.cc X-Suspicious-Flag: YES X-Classification-ID: 696d1106-030f-11ea-a718-5254000cc6d4-1-1 Received: from [216.105.38.7] ([216.105.38.7:42620] helo=lists.sourceforge.net) by smtp40.gate.iad3b.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id D6/E5-19038-C9BE6CD5; Sat, 09 Nov 2019 11:38:52 -0500 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.90_1) (envelope-from ) id 1iTTkD-00066c-VR; Sat, 09 Nov 2019 16:37:49 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1iTTkC-00066V-Kw for openvpn-devel@lists.sourceforge.net; Sat, 09 Nov 2019 16:37:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=7RYrvcYDjIOK+H0ucQELKlE5cGoXI1NHs4dW+282PMY=; b=XS8JJqKAOn8I2wlXMRUEe5DBeL xdKm8kYlmIBD2TV2N99gI4ku2KbvD69WTi3aFxNB9DHLh0P34WMh5aiXNtpqUlXdSH7NB2vzeda+r uokDoEhvNQrbiZCm2fNhuzscIcz2heLLlMqv1IJJnSrOViaR5VGVmkeuZos2hxzXezks=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=7RYrvcYDjIOK+H0ucQELKlE5cGoXI1NHs4dW+282PMY=; b=g OQvxM1H7uM1657yDz3BlJ6QKmknpVfl0OBdTVbq0kj1CKGjmHzA5WBMCPIqdww02wpTYueJR0z0ho 9h9p1c6aqDefkNrhPE8sTOPR8Z0onrgRBT6INtpIFeAouLcpzY6AK754QcmMPmTFWCLH5o/RMZ2uf CmfeeHJavq88GKkQ=; Received: from s2.neomailbox.net ([5.148.176.60]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1iTTkA-009fxn-LL for openvpn-devel@lists.sourceforge.net; Sat, 09 Nov 2019 16:37:48 +0000 From: Antonio Quartulli To: openvpn-devel@lists.sourceforge.net Date: Sat, 9 Nov 2019 17:37:14 +0100 Message-Id: <20191109163714.25506-1-a@unstable.cc> MIME-Version: 1.0 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [5.148.176.60 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1iTTkA-009fxn-LL Subject: [Openvpn-devel] [PATCH] socks: use the right function when printing struct openvpn_sockaddr 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: , Cc: Antonio Quartulli Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox 57623b4e introduced a print_sockaddr() call in socks.c to print an openvpn_sockaddr object. However, this is not correct because print_sockaddr() expects a sockaddr object as argument instead of openvpn_sockaddr. This error did not lead to any issue because the two objects are very similar in regards to the data accessed by print_sockaddr(). Fix this by replacing print_sockaddr() with print_openvpn_sockaddr(). Signed-off-by: Antonio Quartulli Acked-By: Arne Schwabe Acked-by: Gert Doering --- src/openvpn/socks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/socks.c b/src/openvpn/socks.c index ad3a70b2..57f0cee2 100644 --- a/src/openvpn/socks.c +++ b/src/openvpn/socks.c @@ -416,7 +416,7 @@ recv_socks_reply(socket_descriptor_t sd, memcpy(&addr->addr.in4.sin_port, buf + 8, sizeof(addr->addr.in4.sin_port)); struct gc_arena gc = gc_new(); msg(M_INFO, "SOCKS proxy wants us to send UDP to %s", - print_sockaddr(addr, &gc)); + print_openvpn_sockaddr(addr, &gc)); gc_free(&gc); }