[Bug 255704] Feature Request: ipfw: print time in ISO8601 or allow to pass time format string
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat May 15 07:16:24 UTC 2021
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255704
parv <parv.0zero9+freebsd at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |parv.0zero9+freebsd at gmail.c
| |om
--- Comment #2 from parv <parv.0zero9+freebsd at 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 depending
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-epoch
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
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ipfw
mailing list