laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/29331 )
Change subject: Abort if processing SCTP connection without HNB context ......................................................................
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(-)
Approvals: Jenkins Builder: Verified neels: Looks good to me, but someone else must approve laforge: Looks good to me, approved
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;