Bug 292464 - if_ovpn has inconsistent counter display
Summary: if_ovpn has inconsistent counter display
Status: In Progress
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 14.3-STABLE
Hardware: amd64 Any
: --- Affects Many People
Assignee: Kristof Provost
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2026-01-14 19:31 UTC by mike
Modified: 2026-01-28 19:21 UTC (History)
2 users (show)

See Also:
markj: mfc-stable15?
markj: mfc-stable14?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mike 2026-01-14 19:31:05 UTC
I noticed when I upgraded from RELENG_13 to RELENG_14 and if_ovpn was being loaded, I was getting zero traffic via my telegraf collector. If I disable DCO, I get counters properly being recorded by telegraf. Looking at the output of netstat , having if_ovpn loaded or not does seem to update things differently. 
e.g. 

Here is netstat with if_ovpn active 

 netstat -I tun416 -n -b 

Name     Mtu Network          Address         Ipkts Ierrs Idrop     Ibytes    Opkts Oerrs     Obytes  Coll
tun416  1500 <Link#6>         tun416              0     0     0          0        0     0          0     0
tun416     - 172.24.4.254/32  172.24.4.254       30     -     -       2122       35     -       2387     -

and here it is without it loaded 

Name     Mtu Network          Address         Ipkts Ierrs Idrop     Ibytes    Opkts Oerrs     Obytes  Coll
tun416  1500 <Link#6>         tun416             18     0     0       1568       21     0       1541     0
tun416     - 172.24.4.254/32  172.24.4.254       16     -     -       1138       19     -       1307     -

The Link line is never updated, which is where I am guessing telegraf is looking for data. 

OpenVPN is from the pkg latest
OpenVPN 2.6.16 amd64-portbld-freebsd14.3 
14.3-STABLE FreeBSD 14.3-STABLE stable/14-215d16e4102b GENERIC amd64
Comment 1 commit-hook freebsd_committer freebsd_triage 2026-01-15 17:15:49 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=21d666a19331f31fb6dfa1e370de5a84a1a5cb46

commit 21d666a19331f31fb6dfa1e370de5a84a1a5cb46
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2026-01-15 14:15:12 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2026-01-15 16:18:27 +0000

    if_ovpn: add interface counters

    Count input/output packets and bytes on the interface as well, not just
    in openvpn-specific counters.

    PR:             292464
    MFC after:      2 weeks
    Sponsored by:   Rubicon Communications, LLC ("Netgate")

 sys/net/if_ovpn.c                | 32 ++++++++++++++++++++++++++++++++
 tests/sys/net/if_ovpn/if_ovpn.sh | 25 +++++++++++++++++++++++++
 2 files changed, 57 insertions(+)
Comment 2 commit-hook freebsd_committer freebsd_triage 2026-01-28 19:21:03 UTC
A commit in branch stable/15 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=1b7a44fbc5532c9c3295d360e40e28dc0be97efb

commit 1b7a44fbc5532c9c3295d360e40e28dc0be97efb
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2026-01-15 14:15:12 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2026-01-28 09:09:10 +0000

    if_ovpn: add interface counters

    Count input/output packets and bytes on the interface as well, not just
    in openvpn-specific counters.

    PR:             292464
    MFC after:      2 weeks
    Sponsored by:   Rubicon Communications, LLC ("Netgate")

    (cherry picked from commit 21d666a19331f31fb6dfa1e370de5a84a1a5cb46)

 sys/net/if_ovpn.c                | 32 ++++++++++++++++++++++++++++++++
 tests/sys/net/if_ovpn/if_ovpn.sh | 25 +++++++++++++++++++++++++
 2 files changed, 57 insertions(+)
Comment 3 commit-hook freebsd_committer freebsd_triage 2026-01-28 19:21:05 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=03094f3700be5c339443fc6372c5e0be9e4ff908

commit 03094f3700be5c339443fc6372c5e0be9e4ff908
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2026-01-15 14:15:12 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2026-01-28 09:09:07 +0000

    if_ovpn: add interface counters

    Count input/output packets and bytes on the interface as well, not just
    in openvpn-specific counters.

    PR:             292464
    MFC after:      2 weeks
    Sponsored by:   Rubicon Communications, LLC ("Netgate")

    (cherry picked from commit 21d666a19331f31fb6dfa1e370de5a84a1a5cb46)

 sys/net/if_ovpn.c                | 32 ++++++++++++++++++++++++++++++++
 tests/sys/net/if_ovpn/if_ovpn.sh | 25 +++++++++++++++++++++++++
 2 files changed, 57 insertions(+)