osmith has submitted this change. (
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27461 )
Change subject: bsc_nat_fsm: fix sccp_sap_get_peer_addr_in
......................................................................
bsc_nat_fsm: fix sccp_sap_get_peer_addr_in
Fix the logic to not always return src->local_sccp_addr. What we need to
know is the peer's address.
Related: SYS#5560
Change-Id: I0055c0fafe672db5ce7a616d94c8964e8d58968f
---
M src/osmo-bsc-nat/bsc_nat_fsm.c
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/src/osmo-bsc-nat/bsc_nat_fsm.c b/src/osmo-bsc-nat/bsc_nat_fsm.c
index 906fd94..1de3e0c 100644
--- a/src/osmo-bsc-nat/bsc_nat_fsm.c
+++ b/src/osmo-bsc-nat/bsc_nat_fsm.c
@@ -69,15 +69,15 @@
return g_bsc_nat->cn;
}
-/* For connection-oriented messages, figure out which side is the BSCNAT,
+/* For connection-oriented messages, figure out which side is not the BSCNAT,
* either the called_addr or calling_addr. */
static int sccp_sap_get_peer_addr_in(struct bsc_nat_ss7_inst *src, struct osmo_sccp_addr
**peer_addr_in,
struct osmo_sccp_addr *called_addr, struct osmo_sccp_addr *calling_addr)
{
- if (osmo_sccp_addr_ri_cmp(&src->local_sccp_addr, called_addr) == 0) {
+ if (osmo_sccp_addr_ri_cmp(&src->local_sccp_addr, called_addr) != 0) {
*peer_addr_in = called_addr;
return 0;
- } else if (osmo_sccp_addr_ri_cmp(&src->local_sccp_addr, calling_addr) == 0) {
+ } else if (osmo_sccp_addr_ri_cmp(&src->local_sccp_addr, calling_addr) != 0) {
*peer_addr_in = calling_addr;
return 0;
}
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27461
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I0055c0fafe672db5ce7a616d94c8964e8d58968f
Gerrit-Change-Number: 27461
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged