aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2011-07-22 18:09:36 +0200
committerDaniel Willmann <daniel@totalueberwachung.de>2011-08-22 19:24:34 +0200
commit73f3f2866f0503c9176bcaedf1721b1a4076ba80 (patch)
treec8d83acf76c18695055c9b241a49bb1f2ee84009
parentd280f2dfbd7fff097a6d0385a027d11f561bd10d (diff)
nat: Add support for traps to the nat
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c
index 50e51f191..82cbf1de3 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c
@@ -1218,6 +1218,13 @@ static int handle_ctrlif_msg(struct bsc_connection *bsc, struct msgb *msg)
cmd->variable = var;
}
+ /* We have to handle TRAPs before matching pending */
+ if (cmd->type == CTRL_TYPE_TRAP) {
+ ctrl_cmd_send_to_all(bsc->nat->ctrl, cmd);
+ talloc_free(cmd);
+ return 0;
+ }
+
/* Find the pending command */
pending = bsc_get_pending(bsc, cmd->id);
if (pending) {