path: root/openbsc/src
diff options
authorJacob Erlbeck <>2014-10-02 14:56:44 +0200
committerHolger Hans Peter Freyther <>2014-10-09 18:09:54 +0200
commit43b8f9f8a10c16ddbcd1caeae742aace0c5e4ee9 (patch)
treeb24d1c2e08f4c2e3fc0f1378bbeda19488ba27f9 /openbsc/src
parentf349baeec8ea633d3a314b71b3f8afe723c49066 (diff)
gbproxy: Send STATUS(BVCI unknown) to BSS on unknown PTP BVCI
Currently BSSGP PTP messages are silently dropped when the BVCI is not known and patching is enabled. The nanoBTS will not recognize this and continue to send messages on the BVCI. If it receives a STATUS(BVCI unknown) instead, it will start a BVC reset procedure instead. This patch modifies gbprox_rx_ptp_from_bss() to return a STATUS(BVCI unknown) to the BSS instead of dropping the message. Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/src')
1 files changed, 11 insertions, 4 deletions
diff --git a/openbsc/src/gprs/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c
index c23e718c6..1437646fa 100644
--- a/openbsc/src/gprs/gb_proxy.c
+++ b/openbsc/src/gprs/gb_proxy.c
@@ -791,12 +791,19 @@ static int gbprox_rx_ptp_from_bss(struct gbproxy_config *cfg,
peer = gbproxy_peer_by_bvci(cfg, ns_bvci);
- if (peer)
- check_peer_nsei(peer, nsei);
+ check_peer_nsei(peer, nsei);
rc = gbprox_process_bssgp_ul(cfg, msg, peer);
- if (!rc)
+ if (!rc) {
+ if (!peer) {
+ LOGP(DGPRS, LOGL_NOTICE, "Didn't find peer for "
+ "BVCI=%u for PTP message from NSVC=%u/NSEI=%u (BSS)\n",
+ ns_bvci, nsvci, nsei);
+ return bssgp_tx_status(BSSGP_CAUSE_UNKNOWN_BVCI,
+ &ns_bvci, msg);
+ }
return 0;
+ }
switch (pdu_type) {