aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo_server_network.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-12-03 19:32:04 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-12-03 19:53:24 +0100
commitff1a5dc75152fb72cd4597036f9c6c712f1c1436 (patch)
treeac86761cc65f49c0d8c8bbccf8dab0e09b16dc5f /src/osmo_server_network.c
parent26327bd0ce2e3f11c9d02511c47fb45bb705b0e3 (diff)
server: Deal with jumbo frames on the wire
The 2000 as a number is too small. Modern networks can have a higher MTU (up to 9000). Take this number and assume there is a big header in front of it.
Diffstat (limited to 'src/osmo_server_network.c')
-rw-r--r--src/osmo_server_network.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osmo_server_network.c b/src/osmo_server_network.c
index 78cda94..7127401 100644
--- a/src/osmo_server_network.c
+++ b/src/osmo_server_network.c
@@ -199,7 +199,7 @@ static int read_cb_initial(struct osmo_fd *fd, struct osmo_pcap_conn *conn)
} else if (conn->pend == 0) {
conn->data->len = ntohs(conn->data->len);
- if (conn->data->len > 2000) {
+ if (conn->data->len > SERVER_MAX_DATA_SIZE) {
LOGP(DSERVER, LOGL_ERROR,
"Implausible data length: %u\n", conn->data->len);
close_connection(conn);