summaryrefslogtreecommitdiff
path: root/src/transport/zerotier
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/zerotier')
-rw-r--r--src/transport/zerotier/zerotier.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/transport/zerotier/zerotier.c b/src/transport/zerotier/zerotier.c
index 05866cfb..73cddf7d 100644
--- a/src/transport/zerotier/zerotier.c
+++ b/src/transport/zerotier/zerotier.c
@@ -921,7 +921,8 @@ zt_pipe_recv_data(zt_pipe *p, const uint8_t *data, size_t len)
if (fragno == (nfrags - 1)) {
// Last frag, maybe shorten the message.
nni_msg_chop(fl->fl_msg, (fragsz - len));
- if (nni_msg_len(fl->fl_msg) > p->zp_rcvmax) {
+ if ((nni_msg_len(fl->fl_msg) > p->zp_rcvmax) &&
+ (p->zp_rcvmax > 0)) {
// Strict enforcement of max recv.
zt_fraglist_clear(fl);
// Just discard the message.