- 
                Notifications
    You must be signed in to change notification settings 
- Fork 8.2k
Closed
Labels
Description
In https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/net/ip/tcp.c#L907, we have the code like:
        if (IS_ENABLED(CONFIG_NET_STATISTICS_TCP) &&
            sys_slist_is_empty(list)) {
                net_stats_update_tcp_seg_ackerr();
        }
It means that if retransmit list is empty, then any ACK received will be considered "error". But that doesn't make sense, because TCP mandates ACK to be set for any packet of the established connection - if there's no advancement in the ack number, the last value will be used, and ACK bit still set.
Thus, the above condition should be removed. The (only?) condition for ACK being invalid is described in #4653 (comment) .