Change in osmo-ttcn3-hacks[master]: LAPDm_RAW_PT: Always pad MAC blocks to their size

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu May 30 13:45:08 UTC 2019


Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14278


Change subject: LAPDm_RAW_PT: Always pad MAC blocks to their size
......................................................................

LAPDm_RAW_PT: Always pad MAC blocks to their size

If a LAPDm message is shorter than the MAC block size, we must pad
it before seding it to L1.  trxcon e.g. would ignore any frames with
the wrong length since Change-Id I258ee9f6d0124b183b1db23a73f1e523fcea89a8

Change-Id: I30bcce27f95974eaca4168a156d1548586c924d6
Related: OS#3415
---
M library/LAPDm_RAW_PT.ttcn
1 file changed, 2 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/78/14278/1

diff --git a/library/LAPDm_RAW_PT.ttcn b/library/LAPDm_RAW_PT.ttcn
index 164d31a..fe2d321 100644
--- a/library/LAPDm_RAW_PT.ttcn
+++ b/library/LAPDm_RAW_PT.ttcn
@@ -453,10 +453,11 @@
 				var RslLinkId link_id;
 				if (lpd.sacch) {
 					link_id := valueof(ts_RslLinkID_SACCH(lpd.sapi));
+					buf := f_pad_oct(enc_LapdmFrame(lpd.lapdm), 21, '2B'O);
 				} else {
 					link_id := valueof(ts_RslLinkID_DCCH(lpd.sapi));
+					buf := f_pad_oct(enc_LapdmFrame(lpd.lapdm), 23, '2B'O);
 				}
-				buf := enc_LapdmFrame(lpd.lapdm);
 				L1CTL.send(ts_L1CTL_DATA_REQ(chan_desc.chan_nr, link_id, buf));
 			}
 

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I30bcce27f95974eaca4168a156d1548586c924d6
Gerrit-Change-Number: 14278
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190530/09b6351d/attachment.html>


More information about the gerrit-log mailing list