Refuse a bind the server cannot record as it refuses one authenticate turns down
Mirror / push (push) Successful in 6s
Test / lint (pull_request) Successful in 24s
Test / test (18) (pull_request) Successful in 38s
Test / test (20) (pull_request) Successful in 32s
Test / test (22) (pull_request) Successful in 32s
Test / test (24) (pull_request) Successful in 34s
Test / test (26) (pull_request) Successful in 32s

This commit is contained in:
2026-09-28 04:05:07 +02:00
parent 2ac72fb3f4
commit 9a07f75bdf
3 changed files with 14 additions and 20 deletions
+10 -13
View File
@@ -170,18 +170,6 @@ function bindRespTlvs(session: Session, options: ServerOptions): TlvInputs | und
};
}
async function acceptBind(
session: Session,
pduObj: PduObject,
bindType: BindType,
options: ServerOptions,
identity: Record<string, string>,
): Promise<void> {
const recorded = session.bound(bindType, pduObj.params.interface_version);
await session.sendReturn(pduObj, recorded.err ? 'ESME_RBINDFAIL' : 'ESME_ROK', identity, bindRespTlvs(session, options));
}
async function onBind(
session: Session,
pduObj: PduObject,
@@ -198,7 +186,16 @@ async function onBind(
return;
}
await acceptBind(session, pduObj, bindType, options, identity);
const recorded = session.bound(bindType, pduObj.params.interface_version);
if (recorded.err) {
session.log.info('server - bind refused', { message: recorded.err.message, systemId });
await session.sendReturn(pduObj, 'ESME_RBINDFAIL', identity);
return;
}
await session.sendReturn(pduObj, 'ESME_ROK', identity, bindRespTlvs(session, options));
session.log.verbose('server - bound', { systemId });
}