Dan Swartzendruber
2014-Jan-30 19:09 UTC
[syslinux] Issue with running tftpd-hpa in inetd mode?
> Correct. Like most UDP-based inetd services, tftpd is intended to berun in 'wait' mode. When the first request arrives, inetd starts the service but does not read the incoming packet (it can't, because it has no way to pass it along to the server). After that, inetd ignores that socket until the server exits. This isn't critical for tftp, but it does help to keep down the number of times the server program is started (an expensive operation) on a busy server. For some other services, it is critical, because the server must be able to exchange packets with the client on the same port on which the original request arrived. In fact, some inetd implementations simply cannot correctly handle a udp/nowait service, so UDP-based services pretty much have to be prepared to run in wait mode. Yeah, I get this part. I think I misunderstood what xinetd was doing - I thought it was waiting for tftpd parent to exit and not processing anything else. So xinetd is ignoring tftp port during this sequence, and any new requests come in and are serviced by the parent tftpd which spawns new tftpd children to do the heavy lifting. If nothing new comes in for 900 seconds, the parent exits, xinetd re-enables tftp and life goes on?
H. Peter Anvin
2014-Jan-30 19:15 UTC
[syslinux] Issue with running tftpd-hpa in inetd mode?
On 01/30/2014 11:09 AM, Dan Swartzendruber wrote:> > Yeah, I get this part. I think I misunderstood what xinetd was doing - I > thought it was waiting for tftpd parent to exit and not processing > anything else. So xinetd is ignoring tftp port during this sequence, and > any new requests come in and are serviced by the parent tftpd which spawns > new tftpd children to do the heavy lifting. If nothing new comes in for > 900 seconds, the parent exits, xinetd re-enables tftp and life goes on? >Yes, that's the idea. -hpa
Dan Swartzendruber
2014-Jan-30 19:19 UTC
[syslinux] Issue with running tftpd-hpa in inetd mode?
> On 01/30/2014 11:09 AM, Dan Swartzendruber wrote: >> >> Yeah, I get this part. I think I misunderstood what xinetd was doing - >> I >> thought it was waiting for tftpd parent to exit and not processing >> anything else. So xinetd is ignoring tftp port during this sequence, >> and >> any new requests come in and are serviced by the parent tftpd which >> spawns >> new tftpd children to do the heavy lifting. If nothing new comes in for >> 900 seconds, the parent exits, xinetd re-enables tftp and life goes on? >> > > Yes, that's the idea.Cool, thanks for the quick reply and sorry for wasting bandwidth :)