aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2022-09-15 12:03:43 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2022-09-26 12:53:11 +0200
commit797378af74e899eec6fd87102ca104bc7da3a722 (patch)
tree8ff3b15e718f020ac877935dfddb6ebb38493727 /include
parent9573ccbe2b04b37cd857841d26c578b037eb77cb (diff)
pcu_sock: check size of primitive
The pcu_sock interface in osmo-bts does check the size of the primitives it receives. Lets do the same in osmo-bsc as well. Change-Id: I247c6f4b5a7a22d17a060a558c4ceb9221ca7351 Related: OS#5198
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/bsc/pcu_if.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/osmocom/bsc/pcu_if.h b/include/osmocom/bsc/pcu_if.h
index 1f398b4aa..3c34cdf4c 100644
--- a/include/osmocom/bsc/pcu_if.h
+++ b/include/osmocom/bsc/pcu_if.h
@@ -5,6 +5,8 @@
extern int pcu_direct;
+#define PCUIF_HDR_SIZE (sizeof(struct gsm_pcu_if) - sizeof(((struct gsm_pcu_if *)0)->u))
+
struct pcu_sock_state {
struct gsm_network *net;
struct osmo_fd listen_bfd; /* fd for listen socket */