diff options
author | Harald Welte <laforge@osmocom.org> | 2020-06-26 15:13:19 +0200 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2020-06-26 16:07:15 +0000 |
commit | 2d3465fd1c0c2d59a852d2203b87d575e8cf9b0c (patch) | |
tree | ec514cd14d9053481521c1e76118016f3a3b75e9 /src/gb | |
parent | 4247c94abf533d743a0c5c8831862ff24e61ca15 (diff) |
gprs_bssgp: Add bssgp_tx_bvc_reset2()
If a BVC-RESET is sent from SGSN, there must not be a cell ID IE
included. See "Note 1" of TS 48.018 Section 10.4.12.
Change-Id: I11d4e70d510265b9c09dffccdab10b3f0816715a
Diffstat (limited to 'src/gb')
-rw-r--r-- | src/gb/gprs_bssgp_bss.c | 8 | ||||
-rw-r--r-- | src/gb/libosmogb.map | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/gb/gprs_bssgp_bss.c b/src/gb/gprs_bssgp_bss.c index 5c9d11cc..5a1ffb92 100644 --- a/src/gb/gprs_bssgp_bss.c +++ b/src/gb/gprs_bssgp_bss.c @@ -290,7 +290,7 @@ int bssgp_tx_bvc_unblock(struct bssgp_bvc_ctx *bctx) } /*! Transmit a BVC-RESET message (Chapter 10.4.12) */ -int bssgp_tx_bvc_reset(struct bssgp_bvc_ctx *bctx, uint16_t bvci, uint8_t cause) +int bssgp_tx_bvc_reset2(struct bssgp_bvc_ctx *bctx, uint16_t bvci, uint8_t cause, bool add_cell_id) { struct msgb *msg = bssgp_msgb_alloc(); struct bssgp_normal_hdr *bgph = @@ -306,7 +306,7 @@ int bssgp_tx_bvc_reset(struct bssgp_bvc_ctx *bctx, uint16_t bvci, uint8_t cause) msgb_tvlv_put(msg, BSSGP_IE_BVCI, 2, (uint8_t *) &_bvci); msgb_tvlv_put(msg, BSSGP_IE_CAUSE, 1, &cause); - if (bvci != BVCI_PTM) { + if (add_cell_id) { uint8_t bssgp_cid[8]; bssgp_create_cell_id(bssgp_cid, &bctx->ra_id, bctx->cell_id); msgb_tvlv_put(msg, BSSGP_IE_CELL_ID, sizeof(bssgp_cid), bssgp_cid); @@ -315,6 +315,10 @@ int bssgp_tx_bvc_reset(struct bssgp_bvc_ctx *bctx, uint16_t bvci, uint8_t cause) return gprs_ns_sendmsg(bssgp_nsi, msg); } +int bssgp_tx_bvc_reset(struct bssgp_bvc_ctx *bctx, uint16_t bvci, uint8_t cause) +{ + return bssgp_tx_bvc_reset2(bctx, bvci, cause, bvci != BVCI_PTM); +} /*! Transmit a FLOW_CONTROL-BVC (Chapter 10.4.4) * \param[in] bctx BVC Context diff --git a/src/gb/libosmogb.map b/src/gb/libosmogb.map index b29ecb97..7a231db5 100644 --- a/src/gb/libosmogb.map +++ b/src/gb/libosmogb.map @@ -15,6 +15,7 @@ bssgp_msgb_ra_put; bssgp_parse_cell_id; bssgp_tx_bvc_block; bssgp_tx_bvc_reset; +bssgp_tx_bvc_reset2; bssgp_tx_bvc_unblock; bssgp_tx_fc_bvc; bssgp_tx_fc_ms; |