On 2006/09/22 10:04, Lars Hansson wrote:
> On Thursday 21 September 2006 20:24, Stuart Henderson wrote:
> > -static is the default for routes added by route(8), netstat -rn
> > indicates this as S in the flags column.
> 
> Hmm, really?

Looks like it, for a manually added route (commonly named
"adding a _static_ route").

> I recall having to use the -static option to make the routes 
> stick. Maybe this was made the default recently or maybe the -static option 
> does something more than mark the route as S?

-static just sets the RTF_STATIC flag, but in src/sbin/route/route.c,
newroute() sets RTF_STATIC anyway (and has done since 1994) unless you
deliberately use -nostatic, so -static is a noop when you add a static
route. If you adjust a route added by some other method, you might
need it though.

newroute(int argc, char **argv)
{
        char *cmd, *dest = "", *gateway = "", *error;
        int ishost = 0, ret = 0, attempts, oerrno, flags = RTF_STATIC;

Reply via email to