Deleted Added
full compact
pf (136942) pf (144638)
1#!/bin/sh
2#
1#!/bin/sh
2#
3# $FreeBSD: head/etc/rc.d/pf 136942 2004-10-25 08:12:28Z pjd $
3# $FreeBSD: head/etc/rc.d/pf 144638 2005-04-04 23:06:10Z seanc $
4#
5
6# PROVIDE: pf
7# REQUIRE: root mountcritlocal netif pflog
8# BEFORE: DAEMON LOGIN
9# KEYWORD: nojail
10
11. /etc/rc.subr

--- 58 unchanged lines hidden (view full) ---

70 ${pf_program:-/sbin/pfctl} -n -f "${pf_rules}"
71}
72
73pf_reload()
74{
75 echo "Reloading pf rules."
76
77 ${pf_program:-/sbin/pfctl} -n -f "${pf_rules}" || return 1
4#
5
6# PROVIDE: pf
7# REQUIRE: root mountcritlocal netif pflog
8# BEFORE: DAEMON LOGIN
9# KEYWORD: nojail
10
11. /etc/rc.subr

--- 58 unchanged lines hidden (view full) ---

70 ${pf_program:-/sbin/pfctl} -n -f "${pf_rules}"
71}
72
73pf_reload()
74{
75 echo "Reloading pf rules."
76
77 ${pf_program:-/sbin/pfctl} -n -f "${pf_rules}" || return 1
78 ${pf_program:-/sbin/pfctl} -Fa > /dev/null 2>&1
78 # Flush everything but existing state entries that way when
79 # rules are read in, it doesn't break established connections.
80 ${pf_program:-/sbin/pfctl} -Fnat -Fqueue -Frules -FSources -Finfo -FTables -Fosfp > /dev/null 2>&1
79 ${pf_program:-/sbin/pfctl} -f "${pf_rules}" ${pf_flags}
80}
81
82pf_resync()
83{
84 # Don't resync if pf is not loaded
85 if ! kldstat -v | grep -q pf\$ ; then
86 return
87 fi
88 ${pf_program:-/sbin/pfctl} -f "${pf_rules}" ${pf_flags}
89}
90
91pf_status()
92{
93 ${pf_program:-/sbin/pfctl} -si
94}
95
96run_rc_command "$1"
81 ${pf_program:-/sbin/pfctl} -f "${pf_rules}" ${pf_flags}
82}
83
84pf_resync()
85{
86 # Don't resync if pf is not loaded
87 if ! kldstat -v | grep -q pf\$ ; then
88 return
89 fi
90 ${pf_program:-/sbin/pfctl} -f "${pf_rules}" ${pf_flags}
91}
92
93pf_status()
94{
95 ${pf_program:-/sbin/pfctl} -si
96}
97
98run_rc_command "$1"