rxrpc: Fix firewall route keepalive

Fix the firewall route keepalive part of AF_RXRPC which is currently
function incorrectly by replying to VERSION REPLY packets from the server
with VERSION REQUEST packets.

Instead, send VERSION REPLY packets to the peers of service connections to
act as keep-alives 20s after the latest packet was transmitted to that
peer.

Also, just discard VERSION REPLY packets rather than replying to them.

Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
David Howells
2018-03-30 21:04:43 +01:00
parent c0b6edef0b
commit ace45bec6d
9 changed files with 204 additions and 4 deletions

View File

@@ -1183,6 +1183,8 @@ void rxrpc_data_ready(struct sock *udp_sk)
switch (sp->hdr.type) {
case RXRPC_PACKET_TYPE_VERSION:
if (!(sp->hdr.flags & RXRPC_CLIENT_INITIATED))
goto discard;
rxrpc_post_packet_to_local(local, skb);
goto out;