[Bug 257118] netstat -r show incorrect expire time

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 11 Jul 2021 19:41:31 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257118

            Bug ID: 257118
           Summary: netstat -r show incorrect expire time
           Product: Base System
           Version: 13.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: joost@jodocus.org

When you add a route with an expire time, the expire time is shown incorrectly.
The number show looks like a timestamp, but it's a couple of days off. A little
over 4 days early in my case. The below example is for IPv6, but IPv4 shows the
same symptom.

To reproduce:

1. add a route with an expire time

# route -6 add fc00::2/128 ::1 -expire +120
add host fc00::2/128: gateway ::1 fib 0

2. `route get` shows the correct values

# route -6 get fc00::2/128 
   route to: fc00::2
destination: fc00::2
    gateway: localhost
        fib: 0
  interface: lo0
      flags: <UP,GATEWAY,HOST,DONE,STATIC>
 recvpipe  sendpipe  ssthresh  rtt,msec    mtu        weight    expire
       0         0         0         0     16384         1       116 

3. `netstat -r` does not

# netstat -rn6 | fgrep fc00::2
fc00::2                           ::1                           UGHS        lo0
1625681260

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