[REVIEW]: add multicast NULL route
John Merryweather Cooper
john_m_cooper at yahoo.com
Fri Jun 15 23:12:37 UTC 2007
Poul-Henning Kamp wrote:
> On a system without a default route, multicast simply doesn't work.
>
> This patch adds a route into lo0 for the entire multicast space.
>
> A similar route were created in /etc/netstart until version 1.32
> where it was moved to sysconfig (1.14) where the incorrect resolution
> to conf/1007 commented it out in (1.36) and subsequently it was
> lost in the conversion to new rc world ordering.
>
> As a stylistic feature of this patch, we no longer encroach on the
> administrators namespace by prepending a couple of "__" on the
> internal magic routes.
>
> Review and comments please.
>
> Index: routing
> ===================================================================
> RCS file: /home/ncvs/src/etc/rc.d/routing,v
> retrieving revision 1.143
> diff -u -r1.143 routing
> --- routing 2 May 2007 15:49:30 -0000 1.143
> +++ routing 15 Jun 2007 22:03:59 -0000
> @@ -31,12 +31,17 @@
>
> static_start()
> {
> + # The multicast range must be covered by a route, one way or another
> + # or multicast will simply not work.
> + static_routes="__mcast ${static_routes}"
> + route___mcast="-static -net 224.0.0.0/4 -interface lo0"
> +
> case ${defaultrouter} in
> [Nn][Oo] | '')
> ;;
> *)
> - static_routes="default ${static_routes}"
> - route_default="default ${defaultrouter}"
> + static_routes="__default ${static_routes}"
> + route___default="__default ${defaultrouter}"
> ;;
> esac
>
Creating this default route for non-gateway machines might be useful for
GNOME and KDE machines where some of the utility programs want multicast
access. Maybe put this in a startup script GNOME and KDE could share?
I've got mine in rc.local.
I like using lo0 instead of my outside interface for the static route.
However, it occurs to me that the uninitiated could be frustrated by
default firewall settings. In particular, the 224.0.0.0/4 isn't going
to pass through anti-spoofing rules for lo0.
jmc
More information about the freebsd-current
mailing list