Browse Source

Refine MAX_FRAG

pull/1257/head
Max Lv 7 years ago
parent
commit
504a3f7813
1 changed files with 2 additions and 2 deletions
  1. 4
      src/server.c

4
src/server.c

@ -75,7 +75,7 @@
#endif
#ifndef MAX_FRAG
#define MAX_FRAG 2
#define MAX_FRAG 1
#endif
static void signal_cb(EV_P_ ev_signal *w, int revents);
@ -591,7 +591,7 @@ server_recv_cb(EV_P_ ev_io *w, int revents)
close_and_free_server(EV_A_ server);
return;
} else if (err == CRYPTO_NEED_MORE) {
if (server->stage != STAGE_STREAM && server->frag > 1) {
if (server->stage != STAGE_STREAM && server->frag > MAX_FRAG) {
report_addr(server->fd, MALICIOUS, "malicious fragmentation");
close_and_free_remote(EV_A_ remote);
close_and_free_server(EV_A_ server);

Loading…
Cancel
Save