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
This commit is contained in:
parent
3599da158e
commit
1ffc369aa3
@ -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
|
||||
|
@ -216,7 +216,8 @@ CONFS+= ipfilter \
|
||||
.endif
|
||||
|
||||
.if ${MK_IPFW} != "no"
|
||||
CONFS+= ipfw
|
||||
CONFS+= ipfw \
|
||||
dnctl
|
||||
.if ${MK_NETGRAPH} != "no"
|
||||
CONFS+= ipfw_netflow
|
||||
.endif
|
||||
|
27
libexec/rc/rc.d/dnctl
Normal file
27
libexec/rc/rc.d/dnctl
Normal file
@ -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 $*
|
Loading…
Reference in New Issue
Block a user