[REVIEW]: add multicast NULL route

Poul-Henning Kamp phk at phk.freebsd.dk
Fri Jun 15 22:13:58 UTC 2007

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 @@
+	# 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 -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}"
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.

More information about the freebsd-current mailing list