Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 May 2021 07:16:24 +0000
From:      bugzilla-noreply@freebsd.org
To:        ipfw@FreeBSD.org
Subject:   [Bug 255704] Feature Request: ipfw: print time in ISO8601 or allow to pass time format string
Message-ID:  <bug-255704-8303-HeBBUA4xX7@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-255704-8303@https.bugs.freebsd.org/bugzilla/>
References:  <bug-255704-8303@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255704

parv <parv.0zero9+freebsd@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |parv.0zero9+freebsd@gmail.c
                   |                            |om

--- Comment #2 from parv <parv.0zero9+freebsd@gmail.com> ---
As I had noted earlier "[p]arsing ipfw output to convert seconds since Unix
epoch in desired time format is too brittle, as output could change dependi=
ng
on the options passed to ipfw". Compare the output of "ipfw -T list" & "ipfw
-aT list"; in the second form, second value from 2nd column to 4th (counting
from 1) ...

# ipfw -T list | head -n2
00001 1621062170 allow ip from any to any via lo0
00002          0 check-state :default


# ipfw -aT list | head -n2
00001    383     15320 1621062170 allow ip from any to any via lo0
00002      0         0          0 check-state :default


Further, "0" is an unfortunate value to be present in second-since-Unix-epo=
ch
column to represent that this rule has not been used yet. Thus it needs to =
be
treated as a special case -- outside of ipfw -- as time of 1970-01-01 00:00=
:00
UTC makes no sense here. As much is evident in "ipfw -t list" output where
blanks are printed instead of a date-time value ...

# ipfw -t list | head -n2
00001 Fri May 14 21:02:50 2021 allow ip from any to any via lo0
00002                          check-state :default

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-255704-8303-HeBBUA4xX7>