From patchwork Wed Jul 12 09:46:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 3283 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:1496:b0:d7:3b0f:3938 with SMTP id b22csp4249605dyh; Wed, 12 Jul 2023 02:47:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlEUVRqRT3WCpSNMOeeUUOaUOgUwb8DZOV+SFyr+KYTC9AX2E6MuYOleFcMgHgv7gY/9PBKm X-Received: by 2002:a05:6a20:9494:b0:12e:b362:a3fa with SMTP id hs20-20020a056a20949400b0012eb362a3famr13525309pzb.21.1689155226917; Wed, 12 Jul 2023 02:47:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689155226; cv=none; d=google.com; s=arc-20160816; b=wNF924aME2j31BOfzG2DQqgg3TC9FaBhM/EHihTczCKXWZDYZlCyYyvcOzz4y5gwWX 69+o2IjC4/swKEZ6yoXmSN5nnbsZy1ivdGX2kHzKc02GpUTHLpkAj4LJfPnXX9bBYJt9 o4AawcRkBmZDkzkfmgijVMHye8lwaGBw/hfQgN+Eb5rF7NbYdQKnwlvOSE9rAeWMoo6/ RTcPCjqbRaXK/UyQAPcwKcEAdGLdjMZ1MfaA0ruoQ+gI1cCnWijQp87L+yqXjfni3vZ+ DjOiUmirBc5G7R1vte7wR5yiE4vo/MSwPOzIoknddFmL4dz+B7DnMtYW2QPI0WiQZK67 Vs+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:dkim-signature; bh=l3AciKrZeZVeE0k4zuEKbUvG92isJKllV4y9nxuaC84=; fh=upowIstEaPvyXBxHFaCeSfbprOF7d6h3Rt41IfheAVg=; b=nyj4Ya7ja8GvQ7QkDdvNirNMcEHz9EspW+/QoE2DmMzDm5UYEP1+IYaKPQUSHp4LKC 34BCJlS+nIcU7uktsRNC4znZ4Hzyvts554/rYw2SKCeEkNzwK8e3c9zAbEsWPxfM+L0j EYvGnBsQGJDrNwSDi/S6QSzH2/bUTKK+kg7jEQhYy+3p60420zTDUgEnMgs8XRgZ90cZ e2txImP5vaA9WIJuXXXEiViQt0L5sCFMpvGzMg/chWD4t5v4XE01thG9XB8Sb1hyU5Gs rJKDowPbHyE2EPMW95kaet9N127ns6J/yzC7pq0aDkf3C0iawLgmlXM3NkPDQBY5ijSg qSuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=bQCb+kdG; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=bk6gRWx+; 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 Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id fd24-20020a056a002e9800b006765f19e46bsi3130575pfb.147.2023.07.12.02.47.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Jul 2023 02:47:06 -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=bQCb+kdG; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=bk6gRWx+; 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 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 1qJWQh-00038F-In; Wed, 12 Jul 2023 09:46:40 +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 1qJWQf-000389-Jo for openvpn-devel@lists.sourceforge.net; Wed, 12 Jul 2023 09:46:38 +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:To:From:Sender:Reply-To:Cc: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=g7mDPvOcC4H84IPmHU3wsMt1X0GBAzt42zvs+6KuGiU=; b=bQCb+kdGbXTK4npzzfbtF4Ge/g zM3TTEsJ1iEhhEgOkLczhouLXYbmz1GSf4bqpBLFA/txKffG3gJFIVjsDcTpvqhefAjWjdDtofN5H tJShGzO0vDT6xyz0VkdaaSVThW/ejgg7ZXyO3OYx9UNMGBIAM3rxo1zwERBf/EVm4qfg=; 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:To:From: Sender:Reply-To:Cc: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=g7mDPvOcC4H84IPmHU3wsMt1X0GBAzt42zvs+6KuGiU=; b=b k6gRWx+gV/oTRjcYgl07ZBWh+L7FBI/4kvpaSBdht0xEgBI/HOuMLnJlpsEmteCJcDRrSNiOBgoW1 HVKXJ3xdISruqPXO8FfVXuNF6YfR+IwAkdfR4QKEUVP7QvRD6u3jyTKFVjMkB3heeItcoX6AQSwS3 MNYppBVl2qAwamJ0=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1qJWQb-005LoK-RB for openvpn-devel@lists.sourceforge.net; Wed, 12 Jul 2023 09:46:37 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1qJWQO-000Pmf-BG for openvpn-devel@lists.sourceforge.net; Wed, 12 Jul 2023 11:46:20 +0200 Received: (nullmailer pid 569321 invoked by uid 10006); Wed, 12 Jul 2023 09:46:20 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Wed, 12 Jul 2023 11:46:20 +0200 Message-Id: <20230712094620.569273-1-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Score: 0.3 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.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: Android has no facility nor need one to delete routes as routes are automatically cleaned up when the tun interface is closed. Also adjust the IPv4 message to be only shown and verb 7 and rephrase the [...] Content analysis details: (0.3 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-Headers-End: 1qJWQb-005LoK-RB Subject: [Openvpn-devel] [PATCH] Ignore Ipv6 route delete request on Android and set ipv4 verbosity to 7 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: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1771207631082061957?= X-GMAIL-MSGID: =?utf-8?q?1771207631082061957?= Android has no facility nor need one to delete routes as routes are automatically cleaned up when the tun interface is closed. Also adjust the IPv4 message to be only shown and verb 7 and rephrase the message. Change-Id: If8f920d378c31e9ea773ce1f56f3df50f1ec36cd Signed-off-by: Arne Schwabe Acked-by: Gert Doering --- src/openvpn/route.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/openvpn/route.c b/src/openvpn/route.c index 0b369da44..6028de9c2 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -2302,8 +2302,9 @@ delete_route(struct route_ipv4 *r, openvpn_execve_check(&argv, es, 0, "ERROR: OpenBSD/NetBSD route delete command failed"); #elif defined(TARGET_ANDROID) - msg(M_NONFATAL, "Sorry, deleting routes on Android is not possible. The VpnService API allows routes to be set on connect only."); - + msg(D_ROUTE_DEBUG, "Deleting routes on Android is not possible/not " + "needed. The VpnService API allows routes to be set " + "on connect only and will clean up automatically."); #elif defined(TARGET_AIX) { @@ -2490,7 +2491,10 @@ delete_route_ipv6(const struct route_ipv6 *r6, const struct tuntap *tt, network, r6->netbits, gateway); argv_msg(D_ROUTE, &argv); openvpn_execve_check(&argv, es, 0, "ERROR: AIX route add command failed"); - +#elif defined(TARGET_ANDROID) + msg(D_ROUTE_DEBUG, "Deleting routes on Android is not possible/not " + "needed. The VpnService API allows routes to be set " + "on connect only and will clean up automatically."); #else /* if defined(TARGET_LINUX) */ msg(M_FATAL, "Sorry, but I don't know how to do 'route ipv6' commands on this operating system. Try putting your routes in a --route-down script"); #endif /* if defined(TARGET_LINUX) */