From nobody Sat Mar 02 15:35:02 2024 X-Original-To: standards@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tn8Cp5qnLz5CRJj for ; Sat, 2 Mar 2024 15:35:02 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tn8Cp0T9Wz42WW for ; Sat, 2 Mar 2024 15:35:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709393702; a=rsa-sha256; cv=none; b=s9u7emSPEsKOD9UrfK/0w/v//z4MjjzJ56j++nvl8oJTWEDMH6sMZ2B9cr5KQfwPr08+FV hnpSrQEYKmJe3wnDn2vgXtpyUGHOWK/s4ZvCpfalAjKzq3dza0SX2NZ0N9nvURVm01CAcS KNZsIi5vjidG0+bDI1/yH3JLhL9ZHgsZ5miq7ktO2jEv2CndhbEOqojPZI7mu94YoMeOa8 X3MiBTlw6s3QmAcZwLk2Ui7pgZ6X2uDu930ESeKoSgn46DGmE0GQVqCcp3bUucAhCizlZT jghRcp5+xhqO0EgELFy2KMteDa7w6nN02t8DdSzkjvmtkCsndes+QOfcLa87kQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709393702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=18LfwxGX4uTQSTyBWIQotrBYBZMcjlIzNCriLQAoMbY=; b=xXqFsY1fmSm8Auwp7Zv+OTrh8+mIWdekFNgSzqbM+UBiNUurk16Ifr8Bq4ja/MCrTFympm IreLjfBro66Za9h907Z6r0V8LDayMSNsukdIO6Vex69d2ig/znyxVZmxTwhm/TeejoV71N RxOFWkz4TsFmpqwigazGbXJ0MoNL07BQyPthFMmCJKSmQNjX9vo4/xmKJS1VP3Cwnfp3Wz GG1d0vuTcqYXVy3oIczUlzXr+iC4Sjnhvreyq1GqGzuxBuJj8LNTzMGtvdF7/jk3VgtO2g aTGEz4Ss6b8kOnVM4PzXj+CMvgF3sffvJEAlGlrBW1Iw+sVzch0+9EicWT3tmA== 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 4Tn8Cp05dhz1FKv for ; Sat, 2 Mar 2024 15:35:02 +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 422FZ1sg019809 for ; Sat, 2 Mar 2024 15:35:01 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 422FZ1mm019807 for standards@FreeBSD.org; Sat, 2 Mar 2024 15:35:01 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: standards@FreeBSD.org Subject: [Bug 277435] [Feature request] Add an option to destroy the tap/tun interface when the descriptor is closed Date: Sat, 02 Mar 2024 15:35:02 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: monsterovich@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: standards@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Standards compliance List-Archive: https://lists.freebsd.org/archives/freebsd-standards List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-standards@freebsd.org X-BeenThere: freebsd-standards@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277435 Bug ID: 277435 Summary: [Feature request] Add an option to destroy the tap/tun interface when the descriptor is closed Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: standards Assignee: standards@FreeBSD.org Reporter: monsterovich@gmail.com When developing the tap library, I ran into the problem that you cannot des= troy an interface (ex. tap0) while the application is running (via SIOCIFDESTROY= ). The ioctl(SIOCIFDESTROY) call will simply hang until the application using = this descriptor finishes (see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D242841#c0). Opening "/dev/tap" does not check if existing interfaces are being used and creates tap(N+1) every time. It would be nice to make a parameter that will control the automatic destruction of the interface when the descriptor is closed. For example: if (ioctl(fd, TAPSIFDCLOSE, 1) < 0) { printf("error: ioctl(TAPSIFDCLOSE)\n"); } close(fd); This mechanism is implemented by default in the Linux driver for tuntap: "A network device will appear as tunXX or tapXX, depending on the options chosen. When the program closes the file descriptor, the network device and= all corresponding routes will disappear." Source: https://docs.kernel.org/networking/tuntap.html --=20 You are receiving this mail because: You are the assignee for the bug.=