CVSROOT: /cvs Module name: src Changes by: bl...@cvs.openbsd.org 2024/04/16 06:56:39
Modified files: sys/netinet : ip_input.c ip_var.h sys/netinet6 : ip6_forward.c ip6_input.c ip6_output.c ip6_var.h Log message: Use route cache function in IP input. Instaed of passing a struct rtentry from ip_input() to ip_forward() and then embed it into a struct route for ip_output(), start with struct route and pass it along. Then the route cache is used consistently. Also the route cache hit and missed counters should reflect reality after this commit. There is a small difference in the code. in_ouraddr() checks for NULL and not rtisvalid(). Previous discussion showed that the route RTF_UP flag should only be considered for multipath routing. Otherwise it does not mean anything. Especially the local and broadcast check in in_ouraddr() should not be affected by interface link status. When doing cache lookups, route must be valid, but after rtalloc_mpath() lookup, use any route that route_mpath() returns. OK claudio@