From fb7f8c5f0771ad65b57cfce4357805be8c673ae7 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 2 Dec 2020 23:29:38 +0100 Subject: gbproxy: Send BVC-STATUS if BSS sends us BVC-RESET without mandatory IEs Change-Id: I198ca70f5e0947735f76d32cd9d3eed159349a94 --- src/gbproxy/gb_proxy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gbproxy/gb_proxy.c b/src/gbproxy/gb_proxy.c index a4ad7af09..8b103c8a0 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); -- cgit v1.2.3