osmith has uploaded this change for review.

View Change

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
---
M src/e1_input.c
M src/e1_input_vty.c
2 files changed, 7 insertions(+), 6 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/80/30280/1
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 @@
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 @@
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,

To view, visit change 30280. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ia7659c209aea0d26eb37d31e771adc91b17ae668
Gerrit-Change-Number: 30280
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-MessageType: newchange