diff options
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/nat/bsc_nat.c | 3 | ||||
-rw-r--r-- | openbsc/src/nat/bsc_sccp.c | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/openbsc/src/nat/bsc_nat.c b/openbsc/src/nat/bsc_nat.c index d5ed7515b..52844276c 100644 --- a/openbsc/src/nat/bsc_nat.c +++ b/openbsc/src/nat/bsc_nat.c @@ -444,7 +444,8 @@ static void remove_bsc_connection(struct bsc_connection *connection) if (sccp_patch->bsc != connection) continue; - nat_send_rlsd(sccp_patch); + if (sccp_patch->has_remote_ref) + nat_send_rlsd(sccp_patch); sccp_connection_destroy(sccp_patch); } diff --git a/openbsc/src/nat/bsc_sccp.c b/openbsc/src/nat/bsc_sccp.c index 90c8499bf..ebe108604 100644 --- a/openbsc/src/nat/bsc_sccp.c +++ b/openbsc/src/nat/bsc_sccp.c @@ -141,6 +141,7 @@ int update_sccp_src_ref(struct sccp_connections *sccp, struct bsc_nat_parsed *pa } sccp->remote_ref = *parsed->src_local_ref; + sccp->has_remote_ref = 1; LOGP(DNAT, LOGL_DEBUG, "Updating 0x%x to remote 0x%x on %p\n", sccp_src_ref_to_int(&sccp->patched_ref), sccp_src_ref_to_int(&sccp->remote_ref), sccp->bsc); |