Browse Source

Refine udp header checking

pull/1887/merge
Max Lv 7 years ago
parent
commit
1d94442546
1 changed files with 6 additions and 0 deletions
  1. 6
      src/udprelay.c

6
src/udprelay.c

@ -732,6 +732,12 @@ remote_recv_cb(EV_P_ ev_io *w, int revents)
goto CLEAN_UP; goto CLEAN_UP;
} }
if (remote_ctx->addr_header_len != len
|| memcmp(buf->data, remote_ctx->addr_header, len) != 0) {
LOGI("[udp] mismatched header");
goto CLEAN_UP;
}
// server may return using a different address type other than the type we // server may return using a different address type other than the type we
// have used during sending // have used during sending
#if defined(MODULE_TUNNEL) || defined(MODULE_REDIR) #if defined(MODULE_TUNNEL) || defined(MODULE_REDIR)

Loading…
Cancel
Save