Jump to content











Photo
- - - - -

TftpPort option from tftp32d.ini is ignored


  • Please log in to reply
2 replies to this topic

#1 Emmanuel André

Emmanuel André
  • Members
  • 2 posts
  • Location:Créteil
  •  
    France

Posted 11 September 2014 - 09:44 AM

I have updated the tftpd32 server to the latest 4.50 version and the tftpd service is now always bound to the default port 69.

It seems that the TftpPort option from the tftp32d.ini file is merely ignored.

 

After analysis of the source code, I discovered that the default value (69) is hardcoded (line 70 of tftp_main.c)

---

wsprintf (szServ, "%d", 69);

---

 

By modifying the source code to:

---

wsprintf (szServ, "%d", sSettings.Port);

---

the tftp server binds to the correct port.

 

Do you think this is the right fix ?

If yes, how can I propose this fix for the next version of Tftpd32 ?



#2 Ph. Jounin

Ph. Jounin

    Member

  • Developer
  • 54 posts
  • Location:Lyon (France)

Posted 08 October 2014 - 06:55 PM

Sorry for this issue.

 

The workaround is correct; however i would use the fix :

wsprintf (szServ, "%d", sSettings.Port==0 ? TFTP_DEFPORT : sSettings.Port );

 

Since this value may have been reset in the ini file.

 

 



#3 Emmanuel André

Emmanuel André
  • Members
  • 2 posts
  • Location:Créteil
  •  
    France

Posted 09 October 2014 - 08:24 AM

Thanks for your reply and also for the enhancement of the fix.

 

Have you already planned a new release of Tftpd32 ? (which could include this fix)

If yes, it would help me to know the targeted date.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users