aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2020-12-02 23:29:38 +0100
committerHarald Welte <laforge@osmocom.org>2020-12-05 11:44:38 +0100
commitfb7f8c5f0771ad65b57cfce4357805be8c673ae7 (patch)
tree9f58dbf81c4edba9d87a5bdb622d3b932aef6d5d
parent9a2fc908df052c83da3d8f14141ed9d32cdbccea (diff)
gbproxy: Send BVC-STATUS if BSS sends us BVC-RESET without mandatory IEs
-rw-r--r--src/gbproxy/gb_proxy.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gbproxy/gb_proxy.c b/src/gbproxy/gb_proxy.c
index a4ad7af0..8b103c8a 100644
--- a/src/gbproxy/gb_proxy.c
+++ b/src/gbproxy/gb_proxy.c
@@ -1017,8 +1017,10 @@ static int gbprox_rx_bvc_reset_from_bss(struct gbproxy_config *cfg, struct msgb
struct gbproxy_peer *from_peer = NULL;
uint16_t bvci;
- if (!TLVP_PRESENT(tp, BSSGP_IE_BVCI))
- return 0;
+ if (!TLVP_PRESENT(tp, BSSGP_IE_BVCI) || !TLVP_PRESENT(tp, BSSGP_IE_CAUSE)) {
+ rate_ctr_inc(&cfg->ctrg->ctr[GBPROX_GLOB_CTR_PROTO_ERR_BSS]);
+ return bssgp_tx_status(BSSGP_CAUSE_MISSING_MAND_IE, NULL, msg);
+ }
bvci = ntohs(tlvp_val16_unal(tp, BSSGP_IE_BVCI));
LOGP(DGPRS, LOGL_INFO, "NSE(%05u) Rx BVC RESET (BVCI=%05u)\n", nsei, bvci);