aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-10-08 18:42:05 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-10-08 20:20:43 +0200
commit868a5012131fbcc47dbb45a1cfcc464e49f97b28 (patch)
treea56af3cf7e380799bca6cc467753ad54a53bf877 /include
parentb799344ecd7f0466eb677ccb4d980ed54954f38b (diff)
server: Improve verification of messages from client
Take the chance to define SERVER_MAX_DATA_SIZE as pcap payload, which we can later match to configurable snaplen parameter. Change-Id: I45d4c59026faf1108c0976eb6ad8c270e3577dbf
Diffstat (limited to 'include')
-rw-r--r--include/osmo-pcap/osmo_pcap_server.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/osmo-pcap/osmo_pcap_server.h b/include/osmo-pcap/osmo_pcap_server.h
index c1d318e..cdcdb70 100644
--- a/include/osmo-pcap/osmo_pcap_server.h
+++ b/include/osmo-pcap/osmo_pcap_server.h
@@ -91,7 +91,7 @@ struct osmo_pcap_conn {
int state;
int pend;
int reopen;
- char buf[SERVER_MAX_DATA_SIZE + sizeof(struct osmo_pcap_data)];
+ char buf[sizeof(struct osmo_pcap_data) + sizeof(struct osmo_pcap_pkthdr) + SERVER_MAX_DATA_SIZE];
struct osmo_pcap_data *data;
/* statistics */