aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2022-11-23 12:32:36 +0100
committerOliver Smith <osmith@sysmocom.de>2022-11-23 12:34:00 +0100
commitef0f7c25f04573b07b6f629545881d568fe76220 (patch)
treede144dbf987cd3edabe947d640edebdee915f6e9
parent35c109fd8b9dc7f725a172dcbdf897c1f25d7bb9 (diff)
e1_input: enable tcp keepalive by default
Set the keepalive parameters to E1INP_USE_DEFAULT initially instead of 0. Do this independent of the driver (the only driver making use of this is ipaccess). Closes: OS#5785 Change-Id: Ia7659c209aea0d26eb37d31e771adc91b17ae668
-rw-r--r--src/e1_input.c4
-rw-r--r--src/e1_input_vty.c9
2 files changed, 7 insertions, 6 deletions
diff --git a/src/e1_input.c b/src/e1_input.c
index 6507835..ee529cc 100644
--- a/src/e1_input.c
+++ b/src/e1_input.c
@@ -506,6 +506,10 @@ e1inp_line_create(uint8_t e1_nr, const char *driver_name)
line->num = e1_nr;
line->pcap_fd = -1;
+ line->keepalive_idle_timeout = E1INP_USE_DEFAULT;
+ line->keepalive_num_probes = E1INP_USE_DEFAULT;
+ line->keepalive_probe_interval = E1INP_USE_DEFAULT;
+
line->rate_ctr = rate_ctr_group_alloc(line, &e1inp_ctr_g_d, line->num);
if (!line->rate_ctr) {
LOGPIL(line, DLINP, LOGL_ERROR, "Cannot allocate counter group\n");
diff --git a/src/e1_input_vty.c b/src/e1_input_vty.c
index af30ed9..f6781d1 100644
--- a/src/e1_input_vty.c
+++ b/src/e1_input_vty.c
@@ -379,12 +379,9 @@ static int e1inp_config_write(struct vty *vty)
if (!line->keepalive_num_probes)
vty_out(vty, " no e1_line %u keepalive%s", line->num,
VTY_NEWLINE);
- else if (line->keepalive_idle_timeout == E1INP_USE_DEFAULT &&
- line->keepalive_num_probes == E1INP_USE_DEFAULT &&
- line->keepalive_probe_interval == E1INP_USE_DEFAULT)
- vty_out(vty, " e1_line %u keepalive%s", line->num,
- VTY_NEWLINE);
- else
+ else if (line->keepalive_idle_timeout != E1INP_USE_DEFAULT ||
+ line->keepalive_num_probes != E1INP_USE_DEFAULT ||
+ line->keepalive_probe_interval != E1INP_USE_DEFAULT)
vty_out(vty, " e1_line %u keepalive %d %d %d%s",
line->num,
line->keepalive_idle_timeout,