summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgrange <grange@openbsd.org>2004-10-19 06:45:36 +0000
committergrange <grange@openbsd.org>2004-10-19 06:45:36 +0000
commite24e98b3434ff7d23c03ecc3b481d0528339b465 (patch)
tree809156137eb874e044787c32b186f0ab9e88bc9c
parentdid not compile, sigh (diff)
downloadwireguard-openbsd-e24e98b3434ff7d23c03ecc3b481d0528339b465.tar.xz
wireguard-openbsd-e24e98b3434ff7d23c03ecc3b481d0528339b465.zip
Use inet6 pf rules only for inet6-capable setups, first spotted
by form@pdp-11.org.ru. ok todd@ henning@
-rw-r--r--etc/rc8
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/rc b/etc/rc
index 6192685becd..6c5a14b8f93 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,4 @@
-# $OpenBSD: rc,v 1.256 2004/09/27 16:08:26 henning Exp $
+# $OpenBSD: rc,v 1.257 2004/10/19 06:45:36 grange Exp $
# System startup script run by init on autoboot
# or after single-user.
@@ -142,8 +142,10 @@ if [ "X${pf}" != X"NO" ]; then
RULES="$RULES\npass in proto tcp from any to any port 22 keep state"
RULES="$RULES\npass out proto { tcp, udp } from any to any port 53 keep state"
RULES="$RULES\npass out inet proto icmp all icmp-type echoreq keep state"
- RULES="$RULES\npass out inet6 proto icmp6 all icmp6-type routersol"
- RULES="$RULES\npass in inet6 proto icmp6 all icmp6-type routeradv"
+ if ifconfig lo0 inet6 >/dev/null 2>&1; then
+ RULES="$RULES\npass out inet6 proto icmp6 all icmp6-type routersol"
+ RULES="$RULES\npass in inet6 proto icmp6 all icmp6-type routeradv"
+ fi
RULES="$RULES\npass proto { pfsync, carp }"
case `sysctl vfs.mounts.nfs 2>/dev/null` in
*[1-9]*)