This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/22576 )
Change subject: frame_relay: Discard received messages for DLC not yet active
......................................................................
frame_relay: Discard received messages for DLC not yet active
If we receive messages for a DLC which has not yet reported as being
available by Q.933 LMI, drop the incoming message. Otherwise we would
dispatch it to the user, and the user wants to respond - but then
we reject the transmission due to the inactive DLC.
Change-Id: Ia4a045fdf165b526f429f4617e0fdc76036480bd
Related: OS#4999
---
M src/gb/frame_relay.c
1 file changed, 10 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/76/22576/1
diff --git a/src/gb/frame_relay.c b/src/gb/frame_relay.c
index da7d771..59b26c4 100644
--- a/src/gb/frame_relay.c
+++ b/src/gb/frame_relay.c
@@ -781,19 +781,22 @@
goto out;
}
- llist_for_each_entry(dlc, &link->dlc_list, list) {
- if (dlc->dlci == dlci) {
+ dlc = osmo_fr_dlc_by_dlci(link, dlci);
+ if (dlc) {
+ if (dlc->active) {
/* dispatch to handler of respective DLC */
msg->dst = dlc;
return dlc->rx_cb(dlc->cb_data, msg);
+ } else {
+ LOGPFRL(link, LOGL_NOTICE, "DLCI %u not yet active, discarding\n", dlci);
}
+ } else {
+ if (link->unknown_dlc_rx_cb)
+ return link->unknown_dlc_rx_cb(link->unknown_dlc_rx_cb_data, msg);
+ else
+ LOGPFRL(link, LOGL_NOTICE, "DLCI %u doesn't exist, discarding\n", dlci);
}
- if (link->unknown_dlc_rx_cb)
- return link->unknown_dlc_rx_cb(link->unknown_dlc_rx_cb_data, msg);
- else
- LOGPFRL(link, LOGL_NOTICE, "DLCI %u doesn't exist, discarding\n", dlci);
-
out:
msgb_free(msg);
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22576
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia4a045fdf165b526f429f4617e0fdc76036480bd
Gerrit-Change-Number: 22576
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210131/df9a1245/attachment.htm>