summaryrefslogtreecommitdiffstats
path: root/sys/net/route.c
diff options
context:
space:
mode:
authorsilby <silby@FreeBSD.org>2002-05-31 04:27:51 +0000
committersilby <silby@FreeBSD.org>2002-05-31 04:27:51 +0000
commit1f97abe190a8cd98a9ef9561396fbad7b26b0b58 (patch)
tree3120090af7db6f45fa86be4f07e6e8ebb0c21299 /sys/net/route.c
parent0b8e31ba859b8aa3aec339fcf67bd05866096ac2 (diff)
downloadFreeBSD-src-1f97abe190a8cd98a9ef9561396fbad7b26b0b58.zip
FreeBSD-src-1f97abe190a8cd98a9ef9561396fbad7b26b0b58.tar.gz
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
Diffstat (limited to 'sys/net/route.c')
-rw-r--r--sys/net/route.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index b8e092f..d71a950 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -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++;
OpenPOWER on IntegriCloud