fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/43737?usp=email )
Change subject: proxy: properly set .trx_num in {NOPE,BURST}.ind ......................................................................
proxy: properly set .trx_num in {NOPE,BURST}.ind
The .trx_num field shall indicate the destination channel number. Copying the value from the incoming {NOPE,BURST}.req is wrong.
Change-Id: Ib748ed7b681b582fdfad829a1940d71148e63334 Fixes: 1f6f0559 ("proxy: implement burst forwarding (proxying) logic") Related: OS#6672 --- M proxy/src/burst_fwd.c 1 file changed, 9 insertions(+), 5 deletions(-)
Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve
diff --git a/proxy/src/burst_fwd.c b/proxy/src/burst_fwd.c index f56f316..2c89107 100644 --- a/proxy/src/burst_fwd.c +++ b/proxy/src/burst_fwd.c @@ -44,8 +44,7 @@ #define OSMO_TRXD_F_COMMON_MASK ( \ OSMO_TRXD_F_NOPE_REQ | \ OSMO_TRXD_F_MOD_TYPE | \ - OSMO_TRXD_F_TS_INFO | \ - OSMO_TRXD_F_TRX_NUM \ + OSMO_TRXD_F_TS_INFO \ )
/*! The BURST.req copy wrapped in a queued struct msgb @@ -60,14 +59,14 @@ const struct osmo_trxd_burst_req *br) { struct osmo_trxd_burst_ind bi = { - .flags = br->flags & OSMO_TRXD_F_COMMON_MASK, + .flags = (br->flags & OSMO_TRXD_F_COMMON_MASK) | OSMO_TRXD_F_TRX_NUM, .fn = br->fn, .tn = br->tn, .burst_len = br->burst_len, .mod = br->mod, .tsc_set = br->tsc_set, .tsc = br->tsc, - .trx_num = br->trx_num, + .trx_num = dst_chan, };
/* TRXDv0/v1 BURST.req PDUs carry no MTS field at all, so the true @@ -175,7 +174,12 @@ struct proxy_trx_chan *c = &trx->chans[chan];
for (unsigned int tn = 0; tn < PROXY_TRX_NUM_TS; tn++) { - c->ts[tn].bi = (struct osmo_trxd_burst_ind){ .fn = fn, .tn = tn }; + c->ts[tn].bi = (struct osmo_trxd_burst_ind){ + .flags = OSMO_TRXD_F_TRX_NUM, + .fn = fn, + .tn = tn, + .trx_num = chan, + }; path_sim_fill_nope(&c->ts[tn].bi, g_proxy_ctx->path_sim); } }