From 8553f5532ac7182506845abea0f40e92d5149f24 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 24 Nov 2020 11:31:13 +0100 Subject: 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 --- src/gbproxy/gb_proxy.c | 15 +++++++++++++-- 1 file 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; } -- cgit v1.2.3