[S] Change in osmo-e1d[master]: mux from not-started raw TS: fill with 0xFF
falconia has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/37321?usp=email ) Change subject: mux from not-started raw TS: fill with 0xFF .. mux from not-started raw TS: fill with 0xFF When the channelized mux reads from a raw TS, but that raw TS is not in tx_started state yet, the read function returns "fake" data. However, it was actually returning uninitialized memory content, rather than 0xFF filler used everywhere else, thereby transmitting uninit-memory garbage to whatever is connected to the E1 line. Change it to fill with 0xFF, same as the filler used in other cases such as inactive timeslots. Change-Id: I42849a6d19b020bab789853c3b60af6a1c09f92f --- M src/mux_demux.c 1 file changed, 20 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, but someone else must approve tnt: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/mux_demux.c b/src/mux_demux.c index a0ae717..72379fe 100644 --- a/src/mux_demux.c +++ b/src/mux_demux.c @@ -55,8 +55,10 @@ /* If we're not started yet, we 'fake' data until the other side * send something */ - if (l < 0 && errno == EAGAIN && !ts->raw.tx_started) + if (l < 0 && errno == EAGAIN && !ts->raw.tx_started) { + memset(buf, 0xFF, len); return len; + } ts->raw.tx_started = true; -- To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/37321?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1d Gerrit-Branch: master Gerrit-Change-Id: I42849a6d19b020bab789853c3b60af6a1c09f92f Gerrit-Change-Number: 37321 Gerrit-PatchSet: 1 Gerrit-Owner: falconia Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: falconia Gerrit-Reviewer: laforge Gerrit-Reviewer: tnt Gerrit-MessageType: merged
[S] Change in osmo-e1d[master]: mux from not-started raw TS: fill with 0xFF
Attention is currently required from: falconia. tnt has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/37321?usp=email ) Change subject: mux from not-started raw TS: fill with 0xFF .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/37321?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1d Gerrit-Branch: master Gerrit-Change-Id: I42849a6d19b020bab789853c3b60af6a1c09f92f Gerrit-Change-Number: 37321 Gerrit-PatchSet: 1 Gerrit-Owner: falconia Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: tnt Gerrit-Attention: falconia Gerrit-Comment-Date: Wed, 03 Jul 2024 11:05:17 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-e1d[master]: mux from not-started raw TS: fill with 0xFF
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1d/+/37321?usp=email ) Change subject: mux from not-started raw TS: fill with 0xFF .. mux from not-started raw TS: fill with 0xFF When the channelized mux reads from a raw TS, but that raw TS is not in tx_started state yet, the read function returns "fake" data. However, it was actually returning uninitialized memory content, rather than 0xFF filler used everywhere else, thereby transmitting uninit-memory garbage to whatever is connected to the E1 line. Change it to fill with 0xFF, same as the filler used in other cases such as inactive timeslots. Change-Id: I42849a6d19b020bab789853c3b60af6a1c09f92f --- M src/mux_demux.c 1 file changed, 20 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/21/37321/1 diff --git a/src/mux_demux.c b/src/mux_demux.c index a0ae717..72379fe 100644 --- a/src/mux_demux.c +++ b/src/mux_demux.c @@ -55,8 +55,10 @@ /* If we're not started yet, we 'fake' data until the other side * send something */ - if (l < 0 && errno == EAGAIN && !ts->raw.tx_started) + if (l < 0 && errno == EAGAIN && !ts->raw.tx_started) { + memset(buf, 0xFF, len); return len; + } ts->raw.tx_started = true; -- To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/37321?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1d Gerrit-Branch: master Gerrit-Change-Id: I42849a6d19b020bab789853c3b60af6a1c09f92f Gerrit-Change-Number: 37321 Gerrit-PatchSet: 1 Gerrit-Owner: falconia Gerrit-MessageType: newchange
[S] Change in osmo-e1d[master]: mux from not-started raw TS: fill with 0xFF
Attention is currently required from: falconia, tnt. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/37321?usp=email ) Change subject: mux from not-started raw TS: fill with 0xFF .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/37321?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1d Gerrit-Branch: master Gerrit-Change-Id: I42849a6d19b020bab789853c3b60af6a1c09f92f Gerrit-Change-Number: 37321 Gerrit-PatchSet: 1 Gerrit-Owner: falconia Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: tnt Gerrit-Attention: falconia Gerrit-Attention: tnt Gerrit-Comment-Date: Tue, 02 Jul 2024 15:07:00 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment