cron2 has uploaded a new patch set (#2) to the change originally created by ralf_lici. ( http://gerrit.openvpn.net/c/openvpn/+/1290?usp=email )
The following approvals got outdated and were removed: Code-Review+1 by mrbff, Code-Review+2 by cron2 Change subject: dco-freebsd: fix peer stats storage on client instances ...................................................................... dco-freebsd: fix peer stats storage on client instances Commit bf01a96 introduced a bug in the dco-freebsd path by attempting to store peer statistics in a structure that only exists on server instances. This leads to a SIGSEGV on non-server instances due to a NULL multi_context pointer. Resolve this by checking what mode the current instance is running in and storing peer stats accordingly. Fixes: https://github.com/OpenVPN/openvpn/issues/875 Change-Id: I92b5f3996f2a2180fa5e94719603078c1fc2f7f6 Signed-off-by: Ralf Lici <[email protected]> Acked-by: Gert Doering <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1290 Message-Id: <[email protected]> Signed-off-by: Gert Doering <[email protected]> --- M src/openvpn/dco_freebsd.c 1 file changed, 11 insertions(+), 1 deletion(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/90/1290/2 diff --git a/src/openvpn/dco_freebsd.c b/src/openvpn/dco_freebsd.c index e51f8dd..3521fca 100644 --- a/src/openvpn/dco_freebsd.c +++ b/src/openvpn/dco_freebsd.c @@ -634,7 +634,17 @@ if (nvlist_exists_nvlist(nvl, "bytes")) { - dco_update_peer_stat(dco->c->multi, dco->dco_message_peer_id, nvlist_get_nvlist(nvl, "bytes")); + const nvlist_t *bytes = nvlist_get_nvlist(nvl, "bytes"); + + if (dco->c->mode == CM_TOP) + { + dco_update_peer_stat(dco->c->multi, dco->dco_message_peer_id, bytes); + } + else + { + dco->c->c2.dco_read_bytes = nvlist_get_number(bytes, "in"); + dco->c->c2.dco_write_bytes = nvlist_get_number(bytes, "out"); + } } dco->dco_message_type = OVPN_CMD_DEL_PEER; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1290?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I92b5f3996f2a2180fa5e94719603078c1fc2f7f6 Gerrit-Change-Number: 1290 Gerrit-PatchSet: 2 Gerrit-Owner: ralf_lici <[email protected]> Gerrit-Reviewer: cron2 <[email protected]> Gerrit-Reviewer: flichtenheld <[email protected]> Gerrit-Reviewer: mrbff <[email protected]> Gerrit-Reviewer: plaisthos <[email protected]> Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
