Skip to content

Commit e86ce85

Browse files
author
Stefan Baranoff
committed
dco_linux: add tracing for DCO callback issues
Add extra logging to help track down a race condition/sequencing issue in Linux DCO netlink handling.
1 parent ac61ec4 commit e86ce85

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/openvpn/dco_linux.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ ovpn_dco_nlmsg_create(dco_context_t *dco, enum ovpn_nl_commands cmd)
131131
static int
132132
ovpn_nl_recvmsgs(dco_context_t *dco, const char *prefix)
133133
{
134+
msg(D_DCO_DEBUG, "%s: entering %s", prefix, __func__);
134135
int ret = nl_recvmsgs(dco->nl_sock, dco->nl_cb);
135136

136137
switch (ret)
@@ -163,6 +164,7 @@ ovpn_nl_recvmsgs(dco_context_t *dco, const char *prefix)
163164
break;
164165
}
165166

167+
msg(D_DCO_DEBUG, "%s: leaving %s", prefix, __func__);
166168
return ret;
167169
}
168170

@@ -178,6 +180,7 @@ ovpn_nl_recvmsgs(dco_context_t *dco, const char *prefix)
178180
static int
179181
ovpn_nl_msg_send(dco_context_t *dco, struct nl_msg *nl_msg, const char *prefix)
180182
{
183+
msg(D_DCO_DEBUG, "%s: entering %s", prefix, __func__);
181184
dco->status = 1;
182185

183186
nl_send_auto(dco->nl_sock, nl_msg);
@@ -193,6 +196,7 @@ ovpn_nl_msg_send(dco_context_t *dco, struct nl_msg *nl_msg, const char *prefix)
193196
prefix, strerror(-dco->status), dco->status);
194197
}
195198

199+
msg(D_DCO_DEBUG, "%s: leaving %s", prefix, __func__);
196200
return dco->status;
197201
}
198202

@@ -1020,6 +1024,7 @@ dco_get_peer_stats_multi(dco_context_t *dco, struct multi_context *m)
10201024
int ret = ovpn_nl_msg_send(dco, nl_msg, __func__);
10211025

10221026
nlmsg_free(nl_msg);
1027+
msg(D_DCO_DEBUG, "leaving %s", __func__);
10231028
return ret;
10241029
}
10251030

0 commit comments

Comments
 (0)