laforge submitted this change.

View Change

Approvals: Jenkins Builder: Verified neels: Looks good to me, but someone else must approve laforge: Looks good to me, approved
Abort if processing SCTP connection without HNB context

It was observed that under some circumstances (after HNBAP
HNB-De-Register) we end up crashing because a connection has no HNB
assigned to it. Let's explicitly assert if that happens, in order
clarify and avoid same sort of thing happening without clear view on
what's going on.
The issue will be fixed in a follow-up patch.

Closes: OS#5676
Change-Id: I1eedab6f3ac974e942b02eaae41556f87dd8b6ba
---
M src/osmo-hnbgw/hnbgw.c
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/src/osmo-hnbgw/hnbgw.c b/src/osmo-hnbgw/hnbgw.c
index 5077872..5b8e05c 100644
--- a/src/osmo-hnbgw/hnbgw.c
+++ b/src/osmo-hnbgw/hnbgw.c
@@ -245,6 +245,7 @@
if (!msg)
return -ENOMEM;

+ OSMO_ASSERT(hnb);
/* we store a reference to the HomeNodeB in the msg->dest for the
* benefit of various downstream processing functions */
msg->dst = hnb;

To view, visit change 29331. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I1eedab6f3ac974e942b02eaae41556f87dd8b6ba
Gerrit-Change-Number: 29331
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de>
Gerrit-MessageType: merged