lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #65582] SNTP crash after kod received in multiple serv


From: Michele Da Rold
Subject: [lwip-devel] [bug #65582] SNTP crash after kod received in multiple server
Date: Thu, 11 Apr 2024 10:17:06 -0400 (EDT)

URL:
  <https://savannah.nongnu.org/bugs/?65582>

                 Summary: SNTP crash after kod received in multiple server
                   Group: lwIP - A Lightweight TCP/IP stack
               Submitter: micheledarold
               Submitted: Thu 11 Apr 2024 02:17:06 PM UTC
                Category: apps
                Severity: 3 - Normal
              Item Group: Crash Error
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: git head


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Thu 11 Apr 2024 02:17:06 PM UTC By: Michele Da Rold <micheledarold>
I think to have found a bug in sntp app.

Situation 2 ntp server configured, both of them receive a KOD message and set
kod_received flag to 1.

When app call sntp_try_next_server in order to try the next server (also with
kod_received = 1), we go to /* no other valid server found */ and call
sntp_retry(NULL);

This function call sys_timeout(sntp_retry_timeout, sntp_request, NULL); and
crash because there isn't any timeout free.

I think is necessary to call a sys_untimeout(sntp_try_next_server, NULL);
before calling sys_timeout(sntp_retry_timeout, sntp_request, NULL); in order
to resolve the issue.

Second part, when we have kod_received = 1 we need to increase timeout before
asking again the same server but if the next time the server reply OK I should
put the kod_received = 0 for that server?

Thank you and best regards

Michele








    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?65582>

_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]