Don't establish RSL at same time as OML link on IPA type lines

If we have a BTS-side e1inp_line, we can only establish OML at the
time of line_update.  We have to wait with RSL until the BTS explicitly
tells us the RSL destination IP and port (received via OML from BSC).

This is now handled in a new function called
e1inp_ipa_bts_rsl_connect().
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 2eb0335..7e1891e 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -965,7 +965,7 @@
 		break;
 	}
 	case E1INP_LINE_R_BTS: {
-		struct ipa_client_conn *link, *rsl_link;
+		struct ipa_client_conn *link;
 
 		LOGP(DLINP, LOGL_NOTICE, "enabling ipaccess BTS mode\n");
 
@@ -990,27 +990,6 @@
 			ipa_client_conn_destroy(link);
 			return -EIO;
 		}
-		rsl_link = ipa_client_conn_create(tall_ipa_ctx,
-						  &line->ts[E1INP_SIGN_RSL-1],
-						  E1INP_SIGN_RSL,
-						  line->ops->cfg.ipa.addr,
-						  IPA_TCP_PORT_RSL,
-						  NULL,
-						  ipaccess_bts_cb,
-						  ipaccess_bts_write_cb,
-						  NULL);
-		if (rsl_link == NULL) {
-			LOGP(DLINP, LOGL_ERROR, "cannot create RSL "
-				"BTS link: %s\n", strerror(errno));
-			return -ENOMEM;
-		}
-		if (ipa_client_conn_open(rsl_link) < 0) {
-			LOGP(DLINP, LOGL_ERROR, "cannot open RSL BTS link: %s\n",
-				strerror(errno));
-			ipa_client_conn_close(rsl_link);
-			ipa_client_conn_destroy(rsl_link);
-			return -EIO;
-		}
 		ret = 0;
 		break;
 	}
@@ -1020,6 +999,34 @@
 	return ret;
 }
 
+int e1inp_ipa_bts_rsl_connect(struct e1inp_line *line,
+			      const char *rem_addr, uint16_t rem_port)
+{
+	struct ipa_client_conn *rsl_link;
+
+	rsl_link = ipa_client_conn_create(tall_ipa_ctx,
+					  &line->ts[E1INP_SIGN_RSL-1],
+					  E1INP_SIGN_RSL,
+					  rem_addr, rem_port,
+					  NULL,
+					  ipaccess_bts_cb,
+					  ipaccess_bts_write_cb,
+					  NULL);
+	if (rsl_link == NULL) {
+		LOGP(DLINP, LOGL_ERROR, "cannot create RSL "
+			"BTS link: %s\n", strerror(errno));
+		return -ENOMEM;
+	}
+	if (ipa_client_conn_open(rsl_link) < 0) {
+		LOGP(DLINP, LOGL_ERROR, "cannot open RSL BTS link: %s\n",
+			strerror(errno));
+		ipa_client_conn_close(rsl_link);
+		ipa_client_conn_destroy(rsl_link);
+		return -EIO;
+	}
+	return 0;
+}
+
 void e1inp_ipaccess_init(void)
 {
 	tall_ipa_ctx = talloc_named_const(libosmo_abis_ctx, 1, "ipa");