From 81acaf0ff14fb59ded28c2d914e6ee855030fa75 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sat, 31 Mar 2018 11:20:03 +0800 Subject: [PATCH] tcp_out: Fix updating remainder_flags in tcp_split_unsent_seg The code to migrate flags from original segment updating wrong variable so both remainder and remainder_flags may be incorrect. Fix it. Fixes: f582c8833969 ("tcp: persist timer re-work (bug #50837)") Signed-off-by: Axel Lin Acked-by: Joel Cunningham --- src/core/tcp_out.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c index 114ffba2..80acf227 100644 --- a/src/core/tcp_out.c +++ b/src/core/tcp_out.c @@ -891,7 +891,7 @@ tcp_split_unsent_seg(struct tcp_pcb *pcb, u16_t split) } if (split_flags & TCP_FIN) { split_flags &= ~TCP_FIN; - remainder |= TCP_FIN; + remainder_flags |= TCP_FIN; } /* SYN should be left on split, RST should not be present with data */