Review at https://gerrit.osmocom.org/3127
transaction: reject calls from unidentified subscribers
A valid subscriber is indespensible when allocating a new
transaction. Return NULL if no subscriber is supplied. This
will cause unidentified subscribers to be rejected.
Change-Id: Ia8739b6e329ab02c0064270d02ad1d6ee245520d
---
M openbsc/src/libmsc/transaction.c
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/27/3127/1
diff --git a/openbsc/src/libmsc/transaction.c b/openbsc/src/libmsc/transaction.c
index dba4bed..f9dc1a3 100644
--- a/openbsc/src/libmsc/transaction.c
+++ b/openbsc/src/libmsc/transaction.c
@@ -70,6 +70,10 @@
DEBUGP(DCC, "subscr=%p, net=%p\n", subscr, net);
+ /* a valid subscriber is indispensable */
+ if (subscr == NULL)
+ return NULL;
+
trans = talloc_zero(tall_trans_ctx, struct gsm_trans);
if (!trans)
return NULL;
--
To view, visit https://gerrit.osmocom.org/3127
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia8739b6e329ab02c0064270d02ad1d6ee245520d
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: dexter <[email protected]>