diff --git a/src/etc/netstart b/src/etc/netstart index b554b8a7..b3214354 100644 --- a/src/etc/netstart +++ b/src/etc/netstart @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: netstart,v 1.162 2015/11/12 23:11:11 rpe Exp $ +# $OpenBSD: netstart,v 1.163 2015/12/05 18:43:12 mpi Exp $ # Turn off Strict Bourne shell mode. set +o sh @@ -270,37 +270,18 @@ done # Multicast routing. # # The routing to the 224.0.0.0/4 net is setup according to these rules: -# multicast_host multicast_router route comment -# NO NO -reject no multicast -# NO YES none installed daemon will run -# YES/interface NO -interface YES=def. iface -# Any other combination -reject config error +# multicast route comment +# NO -reject no multicast +# YES none installed daemon can run +# Any other combination -reject config error route -qn delete 224.0.0.0/4 >/dev/null 2>&1 -case "$multicast_host:$multicast_router" in -NO:NO) +case $multicast in +NO) route -qn add -net 224.0.0.0/4 -interface 127.0.0.1 -reject >/dev/null ;; -NO:YES) +YES) ;; -*:NO) - maddr=$(if [[ $multicast_host == YES ]]; then - ed -s '!route -qn show -inet' </dev/null) - if [[ -n $maddr ]]; then - set $maddr - route -qn add -net 224.0.0.0/4 -interface $2 >/dev/null - else - route -qn add -net 224.0.0.0/4 -interface \ - 127.0.0.1 -reject >/dev/null - fi - ;; -*:*) +*) echo 'config error, multicasting disabled until rc.conf is fixed' route -qn add -net 224.0.0.0/4 -interface 127.0.0.1 -reject >/dev/null ;; diff --git a/src/etc/rc.conf b/src/etc/rc.conf index 416065b6..450c4dd9 100644 --- a/src/etc/rc.conf +++ b/src/etc/rc.conf @@ -1,4 +1,4 @@ -# $OpenBSD: rc.conf,v 1.208 2015/12/05 09:55:18 jasper Exp $ +# $OpenBSD: rc.conf,v 1.209 2015/12/05 18:43:12 mpi Exp $ # DO NOT EDIT THIS FILE!! # @@ -93,8 +93,7 @@ accounting=NO # process accounting (using /var/account/acct) # Multicast routing configuration # Please look at netstart(8) for a detailed description if you change these -multicast_host=NO # Route all multicast packets to a single interface -multicast_router=NO # A multicast routing daemon will be run, e.g. mrouted +multicast=NO # Reject IPv4 multicast packets by default # miscellaneous other flags amd_master=/etc/amd/master # AMD 'master' map diff --git a/src/etc/rc.d/rc.subr b/src/etc/rc.d/rc.subr index 18957bf1..a5c334c5 100644 --- a/src/etc/rc.d/rc.subr +++ b/src/etc/rc.d/rc.subr @@ -1,4 +1,4 @@ -# $OpenBSD: rc.subr,v 1.100 2015/10/16 20:12:00 ajacoutot Exp $ +# $OpenBSD: rc.subr,v 1.101 2015/12/05 18:43:12 mpi Exp $ # # Copyright (c) 2010, 2011, 2014 Antoine Jacoutot # Copyright (c) 2010, 2011 Ingo Schwarze @@ -124,7 +124,7 @@ _rc_parse_conf() { local _l _rcfile _val set -A _allowed_keys -- \ spamd_black pf ipsec check_quotas accounting \ - multicast_host multicast_router amd_master \ + multicast amd_master \ shlib_dirs pkg_scripts nfs_server [ $# -gt 0 ] || set -- /etc/rc.conf /etc/rc.conf.local