CVSROOT: /cvs Module name: src Changes by: bl...@cvs.openbsd.org 2024/03/31 09:53:12
Modified files: sys/net : route.c route.h sys/netinet : in_pcb.c sys/netinet6 : in6_pcb.c in6_src.c Log message: Combine route_cache() and rtalloc_mpath() in new route_mpath(). Fill and check the cache and call rtalloc_mpath() together. Then the caller of route_mpath() does not have to care about the uint32_t *src pointer and just pass struct in_addr. All the conversions are done inside the functions. A previous version of this diff was backed out. There was an additional rtisvalid() in rtalloc_mpath() that prevented packet output via interfaces that were not up. Now the route in the cache has to be valid, but after new lookup, rtalloc_mpath() may return invalid routes. This generates less errors in userland an preserves existing behavior. OK sashan@