Hi, > In non-dco use, the stats as persisted by the management interface are not > reset throughout the lifetime of the process. With dco, what the driver > provides is "Peer Stats" which is reset in OvpnPeerNew() (linux appears to > do the same). A quick option > would be to move the zero-ing to > OvpnEvtFileCleanup() which, I guess, would work at least when persist-tun is > in use.
Yeah, without persist-tun client closes the handle, which triggers OvpnEvtFileCleanup(), which would reset stats. > Or in a new callback that gets called on tun-open. But then it wont be > strictly "Peer Stats". Yeah that might be an option, to have RESET_STATS ioctl. Also I wonder if the driver could remember, say, the last pid, and then reset stats on NEW_PEER if pid != last pid. Since pids are recycled, we might "leak" stats in unfortunate cases, but that's okay I guess? -- -Lev _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel