summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso2011-07-08 15:12:03 +0200
committerPablo Neira Ayuso2011-07-08 15:12:03 +0200
commitdb1c8a718b66f1a8f50221675b1fb537cf695021 (patch)
tree7332bff36926e29ff48ae2d4aa6a1f9f85f277d9
parenttests: example BTS now sends an OML SW ACT REQ (diff)
downloadlibosmo-abis-db1c8a718b66f1a8f50221675b1fb537cf695021.tar.gz
libosmo-abis-db1c8a718b66f1a8f50221675b1fb537cf695021.tar.xz
libosmo-abis-db1c8a718b66f1a8f50221675b1fb537cf695021.zip
ipaccess: add bugtrag for the RSL link becomes up case
The RSL signal link becomes up for the ipaccess driver is tricky. If the BSC forgets to use the E1 line used by OML for the RSL link, we run into trouble. This patch adds a bugtrap so people don't forget to appropriately handle this case.
-rw-r--r--src/input/ipaccess.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index d0a1b4e..2acac89 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -333,6 +333,15 @@ static int ipaccess_rcvmsg(struct e1inp_line *line, struct msgb *msg,
ret = -EINVAL;
goto err;
}
+ /* this is a bugtrap, the BSC should be using the
+ * virtual E1 line used by OML for this RSL link. */
+ if (sign_link->ts->line == line) {
+ LOGP(DINP, LOGL_ERROR,
+ "Fix your BSC, you should use the "
+ "E1 line used by the OML link for "
+ "your RSL link.\n");
+ return 0;
+ }
/* Finally, we know which OML link is associated with
* this RSL link, attach it to this socket. */
bfd->data = new_line = sign_link->ts->line;