cvs commit: src/sys/net route.c
Qing Li
qingli at FreeBSD.org
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
Log:
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 64.102.54.0/24 60.80.1.1"
is currently allowed even when 60.80.1.1 is only reachable through
the default route. However, an error is thrown when this route is
utilized, say,
"ping 64.102.54.1" 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
60.80.1.1, 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 60.80.1.1
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