Ensure that packet counts are always reset to 0 when

a route is cloned.  Previously, they took on the count
of their parent route (which was sometimes nonzero.)

Submitted by:	Andre Oppermann <oppermann@pipeline.ch>
MFC after:	5 days
This commit is contained in:
Mike Silbersack 2002-05-31 04:27:51 +00:00
parent 9917e01041
commit 54e84abb59

View File

@ -735,6 +735,7 @@ rtrequest1(req, info, ret_nrt)
*/
if (req == RTM_RESOLVE) {
rt->rt_rmx = (*ret_nrt)->rt_rmx; /* copy metrics */
rt->rt_rmx.rmx_pksent = 0; /* reset packet counter */
if ((*ret_nrt)->rt_flags & (RTF_CLONING | RTF_PRCLONING)) {
rt->rt_parent = (*ret_nrt);
(*ret_nrt)->rt_refcnt++;