Subject: Re: fyi
To: Charles M. Hannum <>
From: Paul Traina <>
List: netbsd-bugs
Date: 09/15/1994 10:44:39
  From: "Charles M. Hannum" <>
  Subject: Re: fyi
     I don't know if you folks already caught this one, but, in the 4.4lite
     version of sbin/route/route.c, there is a missing "break" in the case
     clause that sets iflag upon creation of an interface route.  It accidently
     falls through to code that marks these as non-static.
  It's not clear to me that's `accidental'.

Agreed, it wasn't clear to me either until I started thinking about it some.

  1) RTF_STATIC is for `manually added' routes.  Interface routes are
  not `manually added'.

Interface routes can indeed be manually added:

route add -netmask -interface

certainly sounds like a manually added interface route,  and as such should
show up static.
  2) RTF_STATIC isn't used by anything in the kernel, by route(8), by
  routed(8), or by arp(8).  It's only a hint displayed to the user.

  What is it you're trying to fix?
gated(8) makes use of this flag, at minimum in its displays and in MIB output,
and it may use it elsewhere  (I haven't dug that far yet).

If it wasn't a bug, then someone would (well, SHOULD) have put a comment
to the effect that a fall-through was desired.  In this case, I certainly
don't think a fall-through was indeed desired, it was just a small enough
bug that no one noticed or cared until now.

I guess we could ask Keith Sklower (assuming he did the new route.c changes),
but for now, I stand by my opinion that it's a bug, not a feature.