aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2020-11-24 11:31:13 +0100
committerHarald Welte <laforge@osmocom.org>2020-11-24 11:33:16 +0100
commit8553f5532ac7182506845abea0f40e92d5149f24 (patch)
tree86e563967f4540c35d2684e79c5102f109be663a /src
parent3375fa4d64b37ee68f105ce51ea61deeeb8f585b (diff)
gbproxy: Implement paging to entire BSS area
When we receive a PAGING for PS or CS with destination to the entire BSS area, we need to iterate over all peers and send one copy of the paging to each of them. Change-Id: Iecf244238500a354d5a5b40c76f0c0bb8f8c2511
Diffstat (limited to 'src')
-rw-r--r--src/gbproxy/gb_proxy.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/gbproxy/gb_proxy.c b/src/gbproxy/gb_proxy.c
index 6c56233dd..39b9ffdf3 100644
--- a/src/gbproxy/gb_proxy.c
+++ b/src/gbproxy/gb_proxy.c
@@ -1136,12 +1136,23 @@ static int gbprox_rx_paging(struct gbproxy_config *cfg, struct msgb *msg, struct
n_peers++;
}
}
- } else
+ } else if (TLVP_PRESENT(tp, BSSGP_IE_BSS_AREA_ID)) {
+ /* iterate over all peers and dispatch the paging to each matching one */
+ llist_for_each_entry(peer, &cfg->bts_peers, list) {
+ LOGPC(DGPRS, LOGL_INFO, "broadcasting to peer BVCI=%u\n", peer->bvci);
+ gbprox_relay2peer(msg, peer, ns_bvci);
+ n_peers++;
+ }
+ } else {
LOGPC(DGPRS, LOGL_INFO, "\n");
+ LOGP(DGPRS, LOGL_ERROR, "NSEI=%u(SGSN) BSSGP PAGING: "
+ "unable to route, missing IE\n", nsei);
+ rate_ctr_inc(&cfg->ctrg->ctr[errctr]);
+ }
if (n_peers == 0) {
LOGP(DGPRS, LOGL_ERROR, "NSEI=%u(SGSN) BSSGP PAGING: "
- "unable to route, missing IE\n", nsei);
+ "unable to route, no destination found\n", nsei);
rate_ctr_inc(&cfg->ctrg->ctr[errctr]);
return -EINVAL;
}