diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2022-03-14 19:14:29 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2022-03-14 19:14:29 -0700 |
commit | ce8356335027d3929fbfae4127451adaf36e1cd4 (patch) | |
tree | 8ac7d71d3b67a6138e811cd4d4e135d934233e47 /net/tipc/link.c | |
parent | Input: mt6779-keypad - fix signedness bug (diff) | |
parent | Linux 5.17-rc8 (diff) | |
download | linux-dev-ce8356335027d3929fbfae4127451adaf36e1cd4.tar.xz linux-dev-ce8356335027d3929fbfae4127451adaf36e1cd4.zip |
Merge tag 'v5.17-rc8' into next
Sync up with mainline to again get the latest changes in HID subsystem.
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r-- | net/tipc/link.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c index 1e14d7f8f28f..e260c0d557f5 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c @@ -2286,6 +2286,11 @@ static int tipc_link_proto_rcv(struct tipc_link *l, struct sk_buff *skb, break; case STATE_MSG: + /* Validate Gap ACK blocks, drop if invalid */ + glen = tipc_get_gap_ack_blks(&ga, l, hdr, true); + if (glen > dlen) + break; + l->rcv_nxt_state = msg_seqno(hdr) + 1; /* Update own tolerance if peer indicates a non-zero value */ @@ -2311,10 +2316,6 @@ static int tipc_link_proto_rcv(struct tipc_link *l, struct sk_buff *skb, break; } - /* Receive Gap ACK blocks from peer if any */ - glen = tipc_get_gap_ack_blks(&ga, l, hdr, true); - if(glen > dlen) - break; tipc_mon_rcv(l->net, data + glen, dlen - glen, l->addr, &l->mon_state, l->bearer_id); |