Attention is currently required from: pespin.
fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39556?usp=email )
Change subject: s1ap_proxy: catch exceptions in handle_pdu/2 ......................................................................
Patch Set 1: Code-Review+2
(1 comment)
File src/s1ap_proxy.erl:
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39556/comment/3056dcff_e2e0d... : PS1, Line 240: {{forward, OrigData}, S0} %% XXX: proxy as-is or drop?
... once processing of packets is split into multiple steps (parsing, processing, transmitting)
If you carefully look at the code, you'll see that it's already done in three steps:
* `decode_pdu/1` - parsing/decoding, * `handle_pdu/2` - processing (patching), * `encode_pdu/1` and return - encoding and sending.
... the best would be to look at the parsed message type and answer accordingly eg. rejecting the request?
The message type is already known here, as well as the criticality, so we can improve this aspect in follow-up patches. For now I simply want to address one specific problem: crashing process and loosing all E-RABs if something goes wrong in `handle_pdu/2`.