From nobody Tue Nov 22 10:42:23 2022 X-Original-To: dev-commits-src-main@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 4NGgnC2gZWz4jXNh; Tue, 22 Nov 2022 10:42:23 +0000 (UTC) (envelope-from git@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 4NGgnC2D8Cz3vHk; Tue, 22 Nov 2022 10:42:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669113743; 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=YzcFJHiIk3LdW4DwRuzbY6Pm2N223MORLSui5w3l6HQ=; b=la4ONArE7/EVHp8S8XMvEa9LDU9c5G4qTpGTqPhzGmz9Dsecqje1E6+I3eEuVRIgxw3aKR wVAOBjkaaZPRQWkc8b9Y28h1e/7Vcs+26jeh/0KGN3aHWeEecCbFPzHTu8A59A1qIVG9Ws HawF+ADqFI181EaJYkYu8zYIWptns6FmgvNwU2ctS6InNZd647QMgy+IH8wY9pkrR9obtt 5fjBLXv7NyfufUsdvcmd7PVjdfu95YXPlpH2BZA4eJj63eRUb95ka/AaI+cmWkGFhfariN 44fFkJKSTjwWtQ37TvXomW8kK8yCIT83fxguIUkjlq8SAe7ml9fJLrDRSTtehw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669113743; 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=YzcFJHiIk3LdW4DwRuzbY6Pm2N223MORLSui5w3l6HQ=; b=suWPs3VRTCADSY3FEunTwoowOqbYr+uNX5S0IFNNIWuzNfjsPfq54Ru6WhiNQl/+I5Kubm d3FOYa/YGKbconDLLOFyPRvatPoHVKA3zS3XOQLvSov2xdD0WIU0PME1+viGxKgaqIgKSo zYub8ycrRXqOF90d5hu2XvEQS/ru08ggvlu1InlzQhNmedfOvmXVkWxUEubXtWAP6rirmv 6WWWVe+cmGOOvs4C3qWfkeGwLfNbI+Y3O75cpH3ZNnVUnGl8KBd1aNgtH00LAcP7CcG390 rmAWRct9FrYfJ4j0dkWh9wJivjzm+v3DPVv9ii6y2n38UvkGVs5/r3eV78d5ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1669113743; a=rsa-sha256; cv=none; b=CMFkcQYj9vNrOs6/vKd0XHbZ2dCreLdjVdEWx/LbvdVrrnVIy3tBITB7XxN7qLropUAGpq HBYWwRWERG8mGekRXCjBKEbLCt171QQfiv0Tw6oh55zSA8HUrwkm9+OGRNwMNeEDQ4D32e NfVOHkXUEebGfDaTmydDZIqhLe+nYiKhvlTT7geUmZNOPmBY7velWgyrdODPrq8B5TisO6 40GKeFdY2Fq1CxaxoVR3f9aEyCbsUHuJYUpCdPVwQ3xGXYIlsI2m9LMN2eeB1MOvR+xP+z gEpAmX0+m67jp3bgtGw1JsCVdArtGfJxnhaIrjI7OT5zTmJbw5eJqitG5WZepw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4NGgnC1GsQzfTB; Tue, 22 Nov 2022 10:42:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2AMAgNiv057101; Tue, 22 Nov 2022 10:42:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AMAgNHh057100; Tue, 22 Nov 2022 10:42:23 GMT (envelope-from git) Date: Tue, 22 Nov 2022 10:42:23 GMT Message-Id: <202211221042.2AMAgNHh057100@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 1ffc369aa3e2 - main - Add dnctl rc.d service List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1ffc369aa3e2372ee1492183f8c79f9c2c08a782 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=1ffc369aa3e2372ee1492183f8c79f9c2c08a782 commit 1ffc369aa3e2372ee1492183f8c79f9c2c08a782 Author: Goran Mekic AuthorDate: 2022-11-22 09:46:19 +0000 Commit: Kristof Provost CommitDate: 2022-11-22 09:46:19 +0000 Add dnctl rc.d service As PF now also supports dummynet but can not configure it on its own, the service which configures pipes, queues and schedulers is needed. Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D37451 --- libexec/rc/rc.conf | 3 +++ libexec/rc/rc.d/Makefile | 3 ++- libexec/rc/rc.d/dnctl | 27 +++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 63832505eade..5ead8a6fd9de 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -244,6 +244,9 @@ pflog_enable="NO" # Set to YES to enable packet filter logging pflog_logfile="/var/log/pflog" # where pflogd should store the logfile pflog_program="/sbin/pflogd" # where the pflogd program lives pflog_flags="" # additional flags for pflogd +dnctl_enable="NO" +dnctl_program="/sbin/dnctl" +dnctl_rules="/etc/dnctl.conf" ftpproxy_enable="NO" # Set to YES to enable ftp-proxy(8) for pf ftpproxy_flags="" # additional flags for ftp-proxy(8) pfsync_enable="NO" # Expose pf state to other hosts for syncing diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile index 36b86a6636d9..0e43b1cd94dc 100644 --- a/libexec/rc/rc.d/Makefile +++ b/libexec/rc/rc.d/Makefile @@ -216,7 +216,8 @@ CONFS+= ipfilter \ .endif .if ${MK_IPFW} != "no" -CONFS+= ipfw +CONFS+= ipfw \ + dnctl .if ${MK_NETGRAPH} != "no" CONFS+= ipfw_netflow .endif diff --git a/libexec/rc/rc.d/dnctl b/libexec/rc/rc.d/dnctl new file mode 100644 index 000000000000..b291864cc235 --- /dev/null +++ b/libexec/rc/rc.d/dnctl @@ -0,0 +1,27 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: dnctl +# BEFORE: pf ipfw +# KEYWORD: nojailvnet + +. /etc/rc.subr + +name="dnctl" +desc="Dummynet packet queuing and scheduling" +rcvar="${name}_enable" +load_rc_config $name +start_cmd="${name}_start" +required_files="$dnctl_rules" +required_modules="dummynet" + +dnctl_start() +{ + startmsg -n "Enabling ${name}" + $dnctl_program "$dnctl_rules" + startmsg '.' +} + +run_rc_command $*