Bug 240947

Summary: Hours calculation in blacklistctl dump output incorrect
Product: Base System Reporter: Paul van der Zwan <freebsdbugs>
Component: binAssignee: Ed Maste <emaste>
Status: Closed FIXED    
Severity: Affects Some People CC: gbe, markj
Priority: ---    
Version: 11.3-STABLE   
Hardware: Any   
OS: Any   

Description Paul van der Zwan 2019-09-30 19:05:22 UTC
When remaining time for blacklist entry > 24h the hours shown is incorrect :

                         218.249.24.98/32:25	OK	1/1	2d52h21m44s
                         45.136.108.29/32:587	OK	1/1	1d28h23m49s
                        106.53.185.230/32:25	OK	1/1	1d34h6m15s

The following patch fixes the error:
$ svn diff contrib/blacklist/bin/support.c
Index: contrib/blacklist/bin/support.c
===================================================================
--- contrib/blacklist/bin/support.c	(revision 352893)
+++ contrib/blacklist/bin/support.c	(working copy)
@@ -107,7 +107,7 @@
 	t /= 60;
 	m = t % 60;
 	t /= 60;
-	h = t % 60;
+	h = t % 24;
 	t /= 24;
 	d = t % 24;
 	t /= 356;
Comment 1 Gordon Bergling freebsd_committer 2020-01-07 09:16:24 UTC
This is already fixed in HEAD by rS354399. MFC should be around around the beginning of February.
Comment 2 Gordon Bergling freebsd_committer 2020-01-07 09:19:35 UTC
This is already fixed in HEAD by rS354399. MFC should be around the beginning of February.
Comment 3 Mark Johnston freebsd_committer 2020-01-07 18:21:06 UTC
Assign to emaste assuming he'll do the MFC.
Comment 4 Gordon Bergling freebsd_committer 2020-08-01 15:15:48 UTC
Closed by r357581 (MFC to 12-STABLE).