nat: Keep track of both sides of the connection
On a CC message we will need to remeber where the source local
reference of the network belonged so we can properly identify
the connection when receiving UDT messages.
diff --git a/openbsc/src/nat/bsc_nat.c b/openbsc/src/nat/bsc_nat.c
index 65fc10b..cafca83 100644
--- a/openbsc/src/nat/bsc_nat.c
+++ b/openbsc/src/nat/bsc_nat.c
@@ -191,7 +191,11 @@
case SCCP_MSG_TYPE_RLSD:
case SCCP_MSG_TYPE_CREF:
case SCCP_MSG_TYPE_DT1:
+ bsc = patch_sccp_src_ref_to_bsc(msg, parsed, nat);
+ break;
case SCCP_MSG_TYPE_CC:
+ if (update_sccp_src_ref(bsc, msg, parsed) != 0)
+ goto exit;
bsc = patch_sccp_src_ref_to_bsc(msg, parsed, nat);
break;
case SCCP_MSG_TYPE_RLC: