mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 02:40:08 +00:00
nic_router: drop closed tcp links immediately
RFCs recommend to keep TCP connections for a certain time even after they finished a close handshake, AFAIK, in order to be able to recognize astray packets when they arrive later. This seems overambitious especially when in the context of the router where session quota is pretty limited. Therefore, this commit drops this final timeout and drops closed connections immediately. Ref #4729
This commit is contained in:
parent
58726a6707
commit
20371d0445
@ -259,11 +259,11 @@ void Tcp_link::_tcp_packet(Tcp_packet &tcp,
|
||||
}
|
||||
}
|
||||
}
|
||||
if (_state == State::OPENING || _state == State::OPEN) {
|
||||
_packet();
|
||||
} else {
|
||||
_dissolve_timeout.schedule(
|
||||
Microseconds(_config_ptr->tcp_max_segm_lifetime().value << 1));
|
||||
switch (_state) {
|
||||
case State::OPENING:
|
||||
case State::OPEN: _packet(); break;
|
||||
case State::CLOSED: _dissolve_timeout.schedule(Microseconds(0UL)); break;
|
||||
default: _dissolve_timeout.schedule(Microseconds(_config_ptr->tcp_max_segm_lifetime().value << 1)); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user