summaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-01-15 13:48:18 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-01-15 13:48:18 +0100
commit036b25fb7fccd6bb99f0f539bb42ef6e2155bed2 (patch)
treefe68a1367588108d61f33f82c790fc123adf1d33 /openbsc
parentc7de8ef0141c5df73c0fcff976b288e9dfd1f241 (diff)
nat: Fail if the control interface can not be initialized
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c
index d5a3a1f..dd06a70 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c
@@ -1510,6 +1510,10 @@ int main(int argc, char **argv)
}
nat->ctrl = bsc_nat_controlif_setup(nat, 4250);
+ if (!nat->ctrl) {
+ fprintf(stderr, "Creating the control interface failed.\n");
+ exit(1);
+ }
nat->msc_con->connection_loss = msc_connection_was_lost;
nat->msc_con->connected = msc_connection_connected;