From owner-freebsd-current Mon May 3 9:36:48 1999 Delivered-To: freebsd-current@freebsd.org Received: from gndrsh.dnsmgr.net (GndRsh.dnsmgr.net [198.145.92.4]) by hub.freebsd.org (Postfix) with ESMTP id 7F69F154A2 for ; Mon, 3 May 1999 09:36:35 -0700 (PDT) (envelope-from rgrimes@gndrsh.dnsmgr.net) Received: (from rgrimes@localhost) by gndrsh.dnsmgr.net (8.9.3/8.9.3) id JAA00473; Mon, 3 May 1999 09:35:31 -0700 (PDT) (envelope-from rgrimes) From: "Rodney W. Grimes" Message-Id: <199905031635.JAA00473@gndrsh.dnsmgr.net> Subject: Re: default route not set up?? In-Reply-To: <372C8EF0.DCE3BD49@odin-corporation.com> from Lars Fredriksen at "May 2, 1999 12:44:16 pm" To: lars@odin-corporation.com (Lars Fredriksen) Date: Mon, 3 May 1999 09:35:31 -0700 (PDT) Cc: braukmann@tse-online.de (Andreas Braukmann), current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Hi, > There are two things going on with the route setup. > > if [ "x$defaultrouter" != "xNO" ] ; then > static_routes="default ${static_routes}" > route_default="default ${defaultrouter}" > fi > > > 1) since route_default is never used, it should be deleted, ignore that > line above. Wrong, it is evaluated when this line is executed: eval route_args=\$route_${i} I wrote this code 4 years ago, it works, has been working and will continue to work. Please, just leave the static/default route stuff alone. > > 2) if you set defaultrouter to anything other than "NO", the > static_route variable gets a "default" route > route label added, and this label will get evaled later on. > > So rc.conf should read: (example from my setup) > > > defaultrouter="YES" # Set to default gateway (or NO). No, the comment is correct as it stands, set it to ``NO'' or set it to the IP address of the defaultroute + any funky route flags you may want on it. > static_routes="local" # Set to static route list (or leave > empty). > route_local=" -net " > route_default=" default " Boo bad, your value of route_default will be smashed by rc.network when it does ``route_default="default ${defaultrouter}"''. You'll end up with the command ``route add default YES'' being executed, not something you really want :-) > > So, two actions are needed. The route_default line from rc.network should > get deleted, and the comment > in rc.conf for the defaultrouter variable should be clearer. > > If others agree, I can go and commit the fixes for that .... NO! Do not agree, read and understand what the trick above is, ``eval route_args=\${route_${i}'' when $i="default'' grabs the route_default for you. -- Rod Grimes - KD7CAX - (RWG25) rgrimes@gndrsh.aac.dev.com Accurate Automation, Inc. Reliable computers for FreeBSD http://www.aai.dnsmgr.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message