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/osmo-remsim/+/16489 )
Change subject: bankd: Reject removeSlotmap when ClientID doesn't match
......................................................................
bankd: Reject removeSlotmap when ClientID doesn't match
It's a bit of a matter of taste whether we should simply log + ignore
if the Client of a removeMappingReq doesn't match what the bankd
currently has configured. I chose to reject it, as a new createMapping
for the same bandk+slot will overwrite any existing mapping anyway,
at least as of I83e319d22896b881c0d882542842f500075aa546
Change-Id: I892282821f4650614d1d08ed4bdf11eaabf947c0
---
M src/bankd/bankd_main.c
1 file changed, 9 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/89/16489/1
diff --git a/src/bankd/bankd_main.c b/src/bankd/bankd_main.c
index 03101fb..94227e3 100644
--- a/src/bankd/bankd_main.c
+++ b/src/bankd/bankd_main.c
@@ -217,9 +217,15 @@
LOGPFSML(srvc->fi, LOGL_ERROR, "could not find to-be-deleted slotmap\n");
resp = rspro_gen_RemoveMappingRes(ResultCode_unknownSlotmap);
} else {
- LOGPFSM(srvc->fi, "removing slotmap\n");
- bankd_srvc_remove_mapping(map);
- resp = rspro_gen_RemoveMappingRes(ResultCode_ok);
+ rspro2client_slot(&cs, &rreq->client);
+ if (!client_slot_equals(&map->client, &cs)) {
+ LOGPFSM(srvc->fi, "ClientId in removeMappingReq != map\n");
+ resp = rspro_gen_RemoveMappingRes(ResultCode_unknownSlotmap);
+ } else {
+ LOGPFSM(srvc->fi, "removing slotmap\n");
+ bankd_srvc_remove_mapping(map);
+ resp = rspro_gen_RemoveMappingRes(ResultCode_ok);
+ }
}
}
server_conn_send_rspro(srvc, resp);
--
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16489
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I892282821f4650614d1d08ed4bdf11eaabf947c0
Gerrit-Change-Number: 16489
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/20191204/43d04c38/attachment.htm>