[PATCH 1/2] ratp: Fix closing connections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When entering the LAST_ACK state we have to set the saved SN to the
received SN of the current packet. With this we properly accept the
final incoming packet and close the connection. Without this we
interpret the final incoming packet as a duplicate of the previous
packet and close the connection only after a timeout.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 lib/ratp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/ratp.c b/lib/ratp.c
index 1901cc8ea8..ce30223bac 100644
--- a/lib/ratp.c
+++ b/lib/ratp.c
@@ -1109,6 +1109,8 @@ static int ratp_behaviour_h2(struct ratp_internal *ri, void *pkt)
 
 	ratp_state_change(ri, RATP_STATE_LAST_ACK);
 
+	ri->sn_received = ratp_sn(hdr);
+
 	return 1;
 }
 
-- 
2.27.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux