cvs commit: src/sys/net route.c

Qing Li qingli at
Tue May 16 12:11:38 PDT 2006

qingli      2006-05-16 19:11:11 UTC

  FreeBSD src repository

  Modified files:
    sys/net              route.c 
  The current routing code allows insertion of indirect routes that have
  gateways which are unreachable except through the default router. For
  example, assuming there is a default route configured, and inserting
  a route
          "route add"
  is currently allowed even when is only reachable through
  the default route. However, an error is thrown when this route is
  utilized, say,
          "ping"  will return an error
  This type of route insertion should be disallowed becasue:
  1) Let's say that somehow our code allowed this packet to flow to
     the default router, and the default router knows the next hop is, then the question is why bother inserting this route in
     the 1st place, just simply use the default route.
  2) Since we're not talking about source routing here, the default
     router could very well choose a different path than using
     for the next hop, again it defeats the purpose of adding this route.
  Reviewed by:    ru, gnn, bz
  Approved by:    andre
  Revision  Changes    Path
  1.116     +19 -0     src/sys/net/route.c

More information about the cvs-src mailing list