diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-05 21:44:51 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-05 21:44:51 +0200 |
commit | 4072ceed32e004c5d866f3127207a1e3e50b8ae5 (patch) | |
tree | 2485202d604a02fd110115a9b8fe0081cc5bdecf /openbsc/src/nat/bsc_sccp.c | |
parent | cf6bf63a0de48c3322efd3c9d5e05759085fe504 (diff) |
nat: remove is called on already patched connections..
Fix the test to search for the original message instead
of the already patched one that should not find any items
anyway.
The remove is called on already patched connections so we
need to match it with the patch reference count.
Diffstat (limited to 'openbsc/src/nat/bsc_sccp.c')
-rw-r--r-- | openbsc/src/nat/bsc_sccp.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/openbsc/src/nat/bsc_sccp.c b/openbsc/src/nat/bsc_sccp.c index 84a588a93..e76d52268 100644 --- a/openbsc/src/nat/bsc_sccp.c +++ b/openbsc/src/nat/bsc_sccp.c @@ -129,11 +129,7 @@ void remove_sccp_src_ref(struct bsc_connection *bsc, struct msgb *msg, struct bs llist_for_each_entry(conn, &bsc->nat->sccp_connections, list_entry) { if (memcmp(parsed->src_local_ref, - &conn->real_ref, sizeof(conn->real_ref)) == 0) { - - /* two BSCs have used the same real ref... this is why we rewrite it */ - if (bsc != conn->bsc) - continue; + &conn->patched_ref, sizeof(conn->patched_ref)) == 0) { sccp_connection_destroy(conn); return; |