On 7/31/26 16:38, H. Peter Anvin via Syslinux wrote:
On 2026-07-31 12:33, Chris Hofstaedtler wrote:
On Sat, Jul 18, 2026 at 08:45:25PM -0700, H. Peter Anvin wrote:
On 2026-07-18 20:03, Chris Hofstaedtler wrote:
On Tue, Feb 14, 2017 at 09:32:43PM +0100, Uwe Kleine-König wrote:
On 02/14/2017 08:17 PM, H. Peter Anvin wrote:
Okay, let me chime in here.
That's great, thanks.

AI_ADDRCONFIG seems to be the Wrong Thing[TM].
AI_PASSIVE seems to be the Right Thing[TM].
And you even seem to agree with me, that's still greater :-)
Was this patch ever applied? I see set_sock_addr still uses
     hints.ai_flags = AI_CANONNAME | AI_ADDRCONFIG;

Maybe another solution got applied? I'd love to close the bug on the
Debian side.
Would it be possible to see if b2c36a0b5ab71ff4abb1e321ba05064ea333177b solves
the problem?
So I don't know what Uwe had in mind back when suggesting the GAI
changes. However when trying commit
b2c36a0b5ab71ff4abb1e321ba05064ea333177b now, per its description,
it should be possible to pick any address and tftpd should then
listen on it?

I think these situations should basically be the same:
* as described in the bug, an IP address is not assigned *yet* to
   the interface
* my test scenario, I picked an IP address that I did not assign to
   any interface

In my test scenario, tftpd with commit
b2c36a0b5ab71ff4abb1e321ba05064ea333177b applied still does not
start, instead it gives:
   in.tftpd: cannot bind to local IPv4 socket: Cannot assign requested address

Now I should probably test this on a system that has *no* IPv4
address at all, to see if that makes a difference. But that's a bit
harder right now.

 From my understanding of how other programs work, to really support
binding to an address that is not yet assigned to an interface,
bind() also needs setsockopt IP_FREEBIND first.

Thanks for working on this!

I think you might be right. It's a bit dangerous, but for the specific case of
tftpd it is probably the right thing to do.

Another thing that I would like to do is to support systemd socket activation,
mainly because it naturally solves a lot of the problems with needing to drop
privilege. It is just that *any* changes to this ancient code base is really
painful.

        -hpa

_______________________________________________
Syslinux mailing list
Submissions to [email protected]
Unsubscribe or set options at:
https://lists.syslinux.org/syslinux

As in making syslinux dependent on systemd?

Reply via email to