slirp: replace compile time DO_KEEPALIVE

Use a global variable instead (similar to slirp_debug)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
This commit is contained in:
Marc-André Lureau 2018-11-14 16:36:28 +04:00 committed by Samuel Thibault
parent 0826c2400d
commit 987d3a51d5
5 changed files with 8 additions and 17 deletions

View file

@ -481,7 +481,7 @@ findso:
* Reset idle time and keep-alive timer.
*/
tp->t_idle = 0;
if (SO_OPTIONS)
if (slirp_do_keepalive)
tp->t_timer[TCPT_KEEP] = TCPTV_KEEPINTVL;
else
tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_IDLE;