diff options
author | Harald Welte <laforge@gnumonks.org> | 2019-05-30 15:08:57 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2019-05-30 15:08:57 +0200 |
commit | 9de7f64922c5531776eb7f80443ac43168f31182 (patch) | |
tree | 6bb06ac064cb6ac793474e062477c2321a18e3b8 | |
parent | bb9512e640a2d6e653db7dd002abed61f8bfd0aa (diff) |
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
-rw-r--r-- | library/LAPDm_RAW_PT.ttcn | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/library/LAPDm_RAW_PT.ttcn b/library/LAPDm_RAW_PT.ttcn index 164d31ad..fe2d3212 100644 --- a/library/LAPDm_RAW_PT.ttcn +++ b/library/LAPDm_RAW_PT.ttcn @@ -453,10 +453,11 @@ module LAPDm_RAW_PT { 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)); } |