diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-11-06 19:49:46 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-11-14 06:00:50 +0300 |
commit | 25abd43600a693a47acd755b5713b342de86a7ca (patch) | |
tree | 543ab08adc6c25287de398df13c484b32e9cae19 /src/map | |
parent | 172f8c8ac189e1f6590324eb0aca14cffdba3083 (diff) | |
download | hercules-25abd43600a693a47acd755b5713b342de86a7ca.tar.gz hercules-25abd43600a693a47acd755b5713b342de86a7ca.tar.bz2 hercules-25abd43600a693a47acd755b5713b342de86a7ca.tar.xz hercules-25abd43600a693a47acd755b5713b342de86a7ca.zip |
Add send packet validation for connections between server and clients.
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/chrif.c | 1 | ||||
-rw-r--r-- | src/map/clif.c | 1 | ||||
-rw-r--r-- | src/map/irc-bot.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c index 43ea7ebe3..af3504ca2 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -1592,6 +1592,7 @@ static int check_connect_char_server(int tid, int64 tick, int id, intptr_t data) sockt->session[chrif->fd]->func_parse = chrif->parse; sockt->session[chrif->fd]->flag.server = 1; + sockt->session[chrif->fd]->flag.validate = 0; sockt->realloc_fifo(chrif->fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK); chrif->connect(chrif->fd); diff --git a/src/map/clif.c b/src/map/clif.c index 9f1038d2c..e1909b438 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -22254,6 +22254,7 @@ static int do_init_clif(bool minimal) packetdb_loaddb(); sockt->set_defaultparse(clif->parse); + sockt->validate = true; if (sockt->make_listen_bind(clif->bind_ip,clif->map_port) == -1) { ShowFatalError("Failed to bind to port '"CL_WHITE"%d"CL_RESET"'\n",clif->map_port); exit(EXIT_FAILURE); diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c index 6f37fa4a6..996107fea 100644 --- a/src/map/irc-bot.c +++ b/src/map/irc-bot.c @@ -63,6 +63,7 @@ static int irc_connect_timer(int tid, int64 tick, int id, intptr_t data) if ((ircbot->fd = sockt->make_connection(ircbot->ip, channel->config->irc_server_port, &opt)) > 0) { sockt->session[ircbot->fd]->func_parse = ircbot->parse; sockt->session[ircbot->fd]->flag.server = 1; + sockt->session[ircbot->fd]->flag.validate = 0; timer->add(timer->gettick() + 3000, ircbot->identify_timer, 0, 0); ircbot->isOn = true; } |