On Thu, Nov 13, 2014 at 03:42:07PM +0100, Martin Pieuchot wrote:
> It also increments rt_use counters for the local routes, (say yeah!).
We have in net/route.h
u_int64_t rmx_pksent; /* packets sent using this route */
#define rt_use rt_rmx.rmx_pksent
So the comment implies that the field is only used for sending packets.
In ip_input() we make route lookups to receive packets.
But we also have
/* overload no longer used field */
#define rtm_use rtm_rmx.rmx_pksent
so rmx_pksent seems obsolete.
What is the meaning of rt_use, sending or using?
If it is "using", can we add a comment in net/route.h?
> + /*
> + * XXX Since local routes' rt_ifp points to lo0
> + * we cannot rely on the rtentry flags.
> + */
> + if (ISSET(rt->rt_ifa->ifa_ifp->if_flags, IFF_UP)) {
Why is there an "XXX"? Your comment describes the situation nicely.
anyway, OK bluhm@