This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Hoernchen gerrit-no-reply at lists.osmocom.orgHoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/14753
Change subject: add ipa keepalive for gsup connections to the hlr
......................................................................
add ipa keepalive for gsup connections to the hlr
Change-Id: I7d0beb9357ab9b1baeb030d726f312008f2fc533
---
M doc/manuals/vty/msc_vty_reference.xml
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/gsup_client_mux.h
M src/libmsc/gsup_client_mux.c
M src/libmsc/msc_net_init.c
M src/libmsc/msc_vty.c
6 files changed, 36 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/53/14753/1
diff --git a/doc/manuals/vty/msc_vty_reference.xml b/doc/manuals/vty/msc_vty_reference.xml
index 0e5d04d..7f7b753 100644
--- a/doc/manuals/vty/msc_vty_reference.xml
+++ b/doc/manuals/vty/msc_vty_reference.xml
@@ -2796,6 +2796,13 @@
<param name='NAME' doc='A unique name for this MSC. For example: PLMN + redundancy server number: MSC-901-70-0. This name is used for GSUP routing and must be set if more than one MSC is connected to the HLR. The default is 'MSC-00-00-00-00-00-00'.' />
</params>
</command>
+ <command id='keepalive <0-300> <1-300>'>
+ <params>
+ <param name='keepalive' doc='Enable keepalive probing' />
+ <param name='<0-300>' doc='Idle interval in seconds before probes are sent, 0 disables keepalive' />
+ <param name='<1-300>' doc='Timeout waiting for PONG response' />
+ </params>
+ </command>
</node>
<node id='config-sgs'>
<name>config-sgs</name>
diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index f6e3ed9..20176ad 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -235,6 +235,8 @@
/* Whether we want to use Osmux against BSCs. Controlled via VTY */
enum osmux_usage use_osmux;
+
+ struct ipa_keepalive_params *ka_params;
};
struct osmo_esme;
diff --git a/include/osmocom/msc/gsup_client_mux.h b/include/osmocom/msc/gsup_client_mux.h
index 07f17c2..46dfee9 100644
--- a/include/osmocom/msc/gsup_client_mux.h
+++ b/include/osmocom/msc/gsup_client_mux.h
@@ -5,6 +5,7 @@
struct gsup_client_mux;
struct ipaccess_unit;
+struct ipa_keepalive_params;
struct gsup_client_mux_rx_cb {
int (* func )(struct gsup_client_mux *gcm, void *data, const struct osmo_gsup_message *gsup_msg);
@@ -25,7 +26,7 @@
struct gsup_client_mux *gsup_client_mux_alloc(void *talloc_ctx);
int gsup_client_mux_start(struct gsup_client_mux *gcm, const char *gsup_server_addr_str, uint16_t gsup_server_port,
- struct ipaccess_unit *ipa_dev);
+ struct ipaccess_unit *ipa_dev, struct ipa_keepalive_params *kap);
int gsup_client_mux_tx(struct gsup_client_mux *gcm, const struct osmo_gsup_message *gsup_msg);
void gsup_client_mux_tx_error_reply(struct gsup_client_mux *gcm, const struct osmo_gsup_message *gsup_orig,
diff --git a/src/libmsc/gsup_client_mux.c b/src/libmsc/gsup_client_mux.c
index e425651..b9ee285 100644
--- a/src/libmsc/gsup_client_mux.c
+++ b/src/libmsc/gsup_client_mux.c
@@ -108,12 +108,12 @@
/* Start a GSUP client to serve this gsup_client_mux. */
int gsup_client_mux_start(struct gsup_client_mux *gcm, const char *gsup_server_addr_str, uint16_t gsup_server_port,
- struct ipaccess_unit *ipa_dev)
+ struct ipaccess_unit *ipa_dev, struct ipa_keepalive_params *kap)
{
gcm->gsup_client = osmo_gsup_client_create2(gcm, ipa_dev,
gsup_server_addr_str,
gsup_server_port,
- &gsup_client_mux_rx, NULL);
+ &gsup_client_mux_rx, NULL, kap);
if (!gcm->gsup_client)
return -ENOMEM;
gcm->gsup_client->data = gcm;
diff --git a/src/libmsc/msc_net_init.c b/src/libmsc/msc_net_init.c
index 4a752bf..3b05e65 100644
--- a/src/libmsc/msc_net_init.c
+++ b/src/libmsc/msc_net_init.c
@@ -122,5 +122,5 @@
},
};
- return gsup_client_mux_start(net->gcm, net->gsup_server_addr_str, net->gsup_server_port, ipa_dev);
+ return gsup_client_mux_start(net->gcm, net->gsup_server_addr_str, net->gsup_server_port, ipa_dev, net->ka_params);
}
diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index 8a976cb..1068de1 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -34,6 +34,8 @@
#include <osmocom/gsm/protocol/gsm_04_14.h>
#include <osmocom/gsm/protocol/gsm_08_08.h>
+#include <osmocom/abis/ipa.h>
+
#include <osmocom/sigtran/sccp_helpers.h>
#include <osmocom/vty/command.h>
@@ -1846,6 +1848,22 @@
return CMD_SUCCESS;
}
+DEFUN(cfg_hlr_gsup_keepalive,
+ cfg_hlr_gsup_keepalive_cmd,
+ "keepalive <0-300> <1-300>",
+ "Enable keepalive probing\n"
+ "Idle interval in seconds before probes are sent, 0 disables keepalive\n"
+ "Timeout waiting for PONG response\n")
+{
+ if (atoi(argv[0]) > 0) {
+ gsmnet->ka_params = talloc_zero(gsmnet, struct ipa_keepalive_params);
+ gsmnet->ka_params->interval = atoi(argv[0]);
+ gsmnet->ka_params->wait_for_resp = atoi(argv[1]);
+ }
+
+ return CMD_SUCCESS;
+}
+
static int config_write_hlr(struct vty *vty)
{
vty_out(vty, "hlr%s", VTY_NEWLINE);
@@ -1855,6 +1873,9 @@
gsmnet->gsup_server_port, VTY_NEWLINE);
if (gsmnet->msc_ipa_name)
vty_out(vty, " ipa-name %s%s", gsmnet->msc_ipa_name, VTY_NEWLINE);
+ if (gsmnet->ka_params)
+ vty_out(vty, " keepalive %d %d%s", gsmnet->ka_params->interval,
+ gsmnet->ka_params->wait_for_resp, VTY_NEWLINE);
return CMD_SUCCESS;
}
@@ -1956,4 +1977,5 @@
install_element(HLR_NODE, &cfg_hlr_remote_ip_cmd);
install_element(HLR_NODE, &cfg_hlr_remote_port_cmd);
install_element(HLR_NODE, &cfg_hlr_ipa_name_cmd);
+ install_element(HLR_NODE, &cfg_hlr_gsup_keepalive_cmd);
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/14753
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I7d0beb9357ab9b1baeb030d726f312008f2fc533
Gerrit-Change-Number: 14753
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190711/1e53e5dc/attachment.htm>