buglwIP - A Lightweight TCP/IP stack - Bugs: bug #65582, SNTP crash after kod received in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #65582: SNTP crash after kod received in multiple server

Submitter:  Michele Da Rold <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 Planned Release:  None
lwIP version:  git head

Thu 11 Apr 2024 02:17:06 PM UTC, original submission:  

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

Michele Da Rold <micheledarold>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by micheledarold (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-f762.
    Corresponding source code