summaryrefslogtreecommitdiff
path: root/net/rxrpc/input.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2018-03-30 23:04:43 +0300
committerDavid Howells <dhowells@redhat.com>2018-03-30 23:04:43 +0300
commitace45bec6d77bc061c3c3d8ad99e298ea9800c2b (patch)
tree3f87956bcdbccf8470eeb867ffe1760998b4bb0c /net/rxrpc/input.c
parentc0b6edef0bf0e33c12eaf80c676ff09def011518 (diff)
downloadlinux-ace45bec6d77bc061c3c3d8ad99e298ea9800c2b.tar.xz
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>
Diffstat (limited to 'net/rxrpc/input.c')
-rw-r--r--net/rxrpc/input.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
index 2a868fdab0ae..d4f2509e018b 100644
--- a/net/rxrpc/input.c
+++ b/net/rxrpc/input.c
@@ -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;