aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Stumpf <sebastian.stumpf87@googlemail.com>2017-02-13 13:39:13 +0100
committerSebastian Stumpf <sebastian.stumpf87@googlemail.com>2017-02-13 13:39:13 +0100
commitf512d5badc6f162de46e36174dcfc865896a0f12 (patch)
tree527e7beaa858103d9b183dc4a57fd2fa0dfe60d0
parent72c7700900b78cdf576ab3394261db7813292489 (diff)
VIRT-PHY: Uplink flag and arfcn check for incoming messages.
All incoming messages with an arfcn unequal that of the bts are ignored. All incoming messages in which the uplink flag in the arfcn is unset are ignored.
-rw-r--r--src/osmo-bts-virtual/l1_if.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/osmo-bts-virtual/l1_if.c b/src/osmo-bts-virtual/l1_if.c
index 7f52f777..b3003ce0 100644
--- a/src/osmo-bts-virtual/l1_if.c
+++ b/src/osmo-bts-virtual/l1_if.c
@@ -153,6 +153,19 @@ static void virt_um_rcv_cb(struct virt_um_inst *vui, struct msgb *msg)
chantype_gsmtap2rsl(gsmtap_chantype, &rsl_chantype, &link_id);
chan_nr = rsl_enc_chan_nr(rsl_chantype, subslot, timeslot);
+ // Generally ignore all msgs that are either not received with the right arfcn...
+ if((arfcn & GSMTAP_ARFCN_MASK) != l1t->trx->arfcn) {
+ LOGP(LOGL_NOTICE, DL1P,
+ "Ignore incoming msg - msg arfcn=%d not equal trx arfcn=%d!\n", arfcn & GSMTAP_ARFCN_MASK, l1t->trx->arfcn);
+ goto nomessage;
+ }
+ // ... or not uplink
+ if(!(arfcn & GSMTAP_ARFCN_F_UPLINK)) {
+ LOGP(LOGL_NOTICE, DL1P,
+ "Ignore incoming msg - no uplink flag.");
+ goto nomessage;
+ }
+
// switch case with removed acch flag
switch (gsmtap_chantype & ~GSMTAP_CHANNEL_ACCH & 0xff) {
case GSMTAP_CHANNEL_RACH: