diff options
author | Alexander Yurchenko <grange@cvs.openbsd.org> | 2004-10-19 06:45:37 +0000 |
---|---|---|
committer | Alexander Yurchenko <grange@cvs.openbsd.org> | 2004-10-19 06:45:37 +0000 |
commit | 3f850dfef6417dcc3acc4fb2c014a76798e1d86d (patch) | |
tree | 701bd227da2de0b05ff2db54bbcb8eee8d50ba47 /etc | |
parent | c56820c826d9fae4b21cc571378305708aa3dab0 (diff) |
Use inet6 pf rules only for inet6-capable setups, first spotted
by form@pdp-11.org.ru.
ok todd@ henning@
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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]*) |