Browse Source

Do not bring up pfsync(4) before the working ruleset

has been loaded. Otherwise, states that are received during the
initial bulk update mismatch the correct pf-checksum and
do not attach to the rules.
Problem identified by david@. Fix done in collaboration.
OK henning@
OPENBSD_4_3
mpf 17 years ago
parent
commit
871544b3fe
2 changed files with 9 additions and 7 deletions
  1. +3
    -5
      src/etc/netstart
  2. +6
    -2
      src/etc/rc

+ 3
- 5
src/etc/netstart View File

@ -1,6 +1,6 @@
#!/bin/sh - #!/bin/sh -
# #
# $OpenBSD: netstart,v 1.116 2007/08/02 03:19:10 david Exp $
# $OpenBSD: netstart,v 1.117 2008/01/09 21:38:19 mpf Exp $
# Strip comments (and leading/trailing whitespace if IFS is set) # Strip comments (and leading/trailing whitespace if IFS is set)
# from a file and spew to stdout # from a file and spew to stdout
@ -304,10 +304,8 @@ fi
# The trunk interfaces need to come up first in this list. # The trunk interfaces need to come up first in this list.
# The vlan interfaces need to come up after trunk. # The vlan interfaces need to come up after trunk.
# The pfsync interfaces need to come up before carp.
# Configure all the carp interfaces which we know about.
# They must come up after pfsync but before default route.
ifmstart "trunk vlan pfsync carp"
# Configure all the carp interfaces which we know about before default route.
ifmstart "trunk vlan carp"
# /etc/mygate, if it exists, contains the name of my gateway host # /etc/mygate, if it exists, contains the name of my gateway host
# that name must be in /etc/hosts. # that name must be in /etc/hosts.


+ 6
- 2
src/etc/rc View File

@ -1,4 +1,4 @@
# $OpenBSD: rc,v 1.308 2007/12/07 17:13:35 deraadt Exp $
# $OpenBSD: rc,v 1.309 2008/01/09 21:38:19 mpf Exp $
# System startup script run by init on autoboot # System startup script run by init on autoboot
# or after single-user. # or after single-user.
@ -221,7 +221,7 @@ if [ X"${pf}" != X"NO" ]; then
RULES="$RULES\npass out inet6 proto icmp6 all icmp6-type routersol" RULES="$RULES\npass out inet6 proto icmp6 all icmp6-type routersol"
RULES="$RULES\npass in inet6 proto icmp6 all icmp6-type routeradv" RULES="$RULES\npass in inet6 proto icmp6 all icmp6-type routeradv"
fi fi
RULES="$RULES\npass proto { pfsync, carp }"
RULES="$RULES\npass proto carp"
case `sysctl vfs.mounts.nfs 2>/dev/null` in case `sysctl vfs.mounts.nfs 2>/dev/null` in
*[1-9]*) *[1-9]*)
# don't kill NFS # don't kill NFS
@ -249,6 +249,10 @@ if [ X"${pf}" != X"NO" ]; then
if [ -f ${pf_rules} ]; then if [ -f ${pf_rules} ]; then
pfctl -f ${pf_rules} pfctl -f ${pf_rules}
fi fi
# bring up pfsync after the working ruleset has been loaded
if [ -f /etc/hostname.pfsync0 ]; then
. /etc/netstart pfsync0
fi
fi fi
mount -s /usr >/dev/null 2>&1 mount -s /usr >/dev/null 2>&1


Loading…
Cancel
Save