From owner-freebsd-net@freebsd.org Thu Jul 23 10:59:40 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 158CF37ACCE for ; Thu, 23 Jul 2020 10:59:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4BC8VM6sshz4Q7F for ; Thu, 23 Jul 2020 10:59:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id EBD2C37AE3F; Thu, 23 Jul 2020 10:59:39 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB97737B01B for ; Thu, 23 Jul 2020 10:59:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BC8VM60Mhz4QJn for ; Thu, 23 Jul 2020 10:59:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B17FA17EA2 for ; Thu, 23 Jul 2020 10:59:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 06NAxdnL022771 for ; Thu, 23 Jul 2020 10:59:39 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 06NAxd4G022770 for net@FreeBSD.org; Thu, 23 Jul 2020 10:59:39 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 248172] if_tuntap(4): OpenVPN configuring tun/tap devices ends up with IFDISABLED interfaces Date: Thu, 23 Jul 2020 10:59:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.1-RELEASE X-Bugzilla-Keywords: needs-qa, regression X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: gert@greenie.muc.de X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: kevans@freebsd.org X-Bugzilla-Flags: maintainer-feedback? mfc-stable12? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2020 10:59:40 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D248172 --- Comment #19 from Gert Doering --- (In reply to Andrey V. Elsukov from comment #17) Thanks for the explanation. I wonder if there is an easy way to trace these scripts, to see when exactly something was ifconfig'ed? I've sprinkled the pccard_ether script with "logger" commands now, and I can see that it will not touch the tun0 interface "if it is already up" (in pccard_ether_start()). In that case, I have no IFDISABLE. If I do "ifconfig tun0 create" by hand, I see it enters quietstart, and I do get IFDISABLE. The added "logger" commands do modify the timing, so it's indeed a race condition. If I have no loggers in the script *before* the decisions about= "is this interface already up or not" are made, I can see it go to quietstart, = and OpenVPN and the kernel message confirm "now it's IFDISABLED". Jul 23 12:50:09 fbsd-tc root[74575]: pccard_ether_start, ifn=3Dtun0 Jul 23 12:50:09 fbsd-tc root[74579]: pccard_ether_start, quietstart Jul 23 12:50:10 fbsd-tc kernel: nd6_dad_timer: cancel DAD on tun0 because of ND6_IFF_IFDISABLED. This is good news, actually, because it turns out to be "very likely not a kernel bug". Apologies for jumping to a conclusion here. On the other hand it's bad news, because I do not know how to fix this "for good". If an OpenVPN user does not have IPv6 enabled on his regular LAN interfaces, he might not have ipv6_activate_all_interfaces=3D"YES" set. Even for someone who *has* IPv6 active (like, me, on that test box) that setting might not be set - because having "ifconfig_em0_ipv6" and "ipv6_defaultrouter" are perfectly fine to get what I want ("a static v6 address + default route"). But they want IPv6 to work inside the tunnel, if their VPN server has worki= ng v6 (it might be their only way to reach the IPv6 Internet). So what should I do? Stick to "sleep(1); ifconfig tun0 inet6 -ifdisabled"? --=20 You are receiving this mail because: You are on the CC list for the bug.=