Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12873 )

Change subject: OML: Properly reject short messages and truncate over-long 
messages
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/12873/1/src/common/oml.c
File src/common/oml.c:

https://gerrit.osmocom.org/#/c/12873/1/src/common/oml.c@1453
PS1, Line 1453:                 msgb_l3trim(msg, oh->length);
> That's weird imho, I'd drop it with oml_tx_failure_event_rep(), since 
> attempting decoding potentiall […]
To me it's quite clear: The OML protocol states there's 10 bytes of payload 
(IEs), and that's what we have to parse.  Extra data at the end of the message 
should not concern us.  In Ethernet, small frames get a trailer at the end.  In 
LLC, there's a CRC at the end. I think this is generally customary that you use 
the length value from the protocol/header you currently work on and ignore any 
extra data at the end.



--
To view, visit https://gerrit.osmocom.org/12873
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib98f0d7c2cff9172714ed18667c02564540d65d7
Gerrit-Change-Number: 12873
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-CC: Pau Espin Pedrol <[email protected]>
Gerrit-Comment-Date: Sun, 10 Feb 2019 22:23:59 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No

Reply via email to