Bug #3461
closedLCR cannot connect to the MNCC socket
50%
Description
(LCR is quite old and somewhat unmaintained, but still used by some as intermediary between the MNCC socket and a SIP agent. Supporting it may help others to contribute to MSC development.)
When the libmsc was originally imported to osmo-msc from legacy openbsc
references to lchan were removed as this was not available:
http://git.osmocom.org/osmo-msc/commit/?id=e2f24d53e4f80b34ec6d656d93127cb598229a96
lchan_type and lchan_mode were removed from the gsm_mncc struct:
http://git.osmocom.org/osmo-msc/diff/include/openbsc/mncc.h?id=e2f24d53e4f80b34ec6d656d93127cb598229a96
Subsequently, in order not to change the size of the protocol message (which would then be rejected by osmo-sip-connector),
lchan_type and lchan_mode were restored to the gsm_mncc struct:
http://git.osmocom.org/osmo-msc/commit/?id=fe6acd61897ce977697825792d59909b4e816273
However, setting of hello->lchan_type_offset in libmsc/mncc_sock.c:queue_hello() was not restored.
Adding:
hello->lchan_type_offset = offsetof(struct gsm_mncc, lchan_type);
prevents LCR from rejecting the protocol message and printing
ERROR (in mncc_fd_read() line 1380) MNCC gsm_mncc offset of lchan_type is 0 832