laforge submitted this change.
bsc_nat_fsm: drop called addr verify
This is already done by the SCCP stack, as Harald explained it:
"Think of a TCP socket where you have already bound a socket and then
still do recvmsg to check if the destination address is what you expect."
Related: SYS#5560
Change-Id: Id9bfbf38a61ef66a4246f752ef487d8a09fea173
---
M src/osmo-bsc-nat/bsc_nat_fsm.c
1 file changed, 0 insertions(+), 10 deletions(-)
diff --git a/src/osmo-bsc-nat/bsc_nat_fsm.c b/src/osmo-bsc-nat/bsc_nat_fsm.c
index e5767b1..ea57e32 100644
--- a/src/osmo-bsc-nat/bsc_nat_fsm.c
+++ b/src/osmo-bsc-nat/bsc_nat_fsm.c
@@ -74,9 +74,7 @@
struct bsc_nat_ss7_inst *src = osmo_sccp_user_get_priv(scu);
struct bsc_nat_ss7_inst *dest = ss7_inst_dest(src);
struct osmo_scu_prim *prim = (struct osmo_scu_prim *) oph;
- struct osmo_sccp_addr *my_addr;
struct osmo_sccp_addr *peer_addr;
- char buf[255];
int rc = -1;
switch (OSMO_PRIM_HDR(oph)) {
@@ -98,17 +96,9 @@
case OSMO_PRIM(OSMO_SCU_PRIM_N_UNITDATA, PRIM_OP_INDICATION):
/* connection-less data received */
- my_addr = &prim->u.unitdata.called_addr;
peer_addr = &prim->u.unitdata.calling_addr;
LOG_SCCP(src, peer_addr, LOGL_DEBUG, "%s(%s)\n", __func__, osmo_scu_prim_name(oph));
- if (osmo_sccp_addr_ri_cmp(&src->local_sccp_addr, my_addr)) {
- osmo_sccp_addr_to_str_buf(buf, sizeof(buf), NULL, my_addr);
- LOG_SCCP(src, peer_addr, LOGL_ERROR, "Called address %s is not the locally configured"
- " address %s\n", buf, osmo_sccp_inst_addr_name(NULL, &src->local_sccp_addr));
- goto error;
- }
-
/* Figure out called party in dest. TODO: build and use a
* mapping of peer_addr + conn_id <--> dest_ss7. For now, this
* is simplified by assuming there is only one MSC, one BSC. */
To view, visit change 27257. To unsubscribe, or for help writing mail filters, visit settings.