Re: [systemd-devel] How to get a useful peer address when doing accept(3, ...) on a systemd supplied listening socket

2022-10-27 Thread Klaus Ebbe Grue
Hi Mantas > I have a feeling it "changes" because you're trying to give the whole > struct sockaddr to inet_pton() instead of giving just the .sin6_addr field, > so your program is trying to interpret the *port number* > (i.e. the .sin6_port which precedes .sin_addr) as part of the address...

[systemd-devel] How to get a useful peer address when doing accept(3, ...) on a systemd supplied listening socket

2022-10-27 Thread Klaus Ebbe Grue
Hi systemd-devel, Sorry to bug you with another user question. I have a socket activated daemon, call it mydaemon, and I have trouble finding out who connects to it. mydaemon.socket contains: [Socket] ListenStream= When I connect using IPv4 using nc -4 localhost then

Re: [systemd-devel] Is it possible to let systemd create a listening socket and yet be able to have that socket activate nothing, at least temporarily?

2022-10-11 Thread Klaus Ebbe Grue
Hi Lennart, > Can't you run your upgrade script in idempotent way as a helper > service that is pulled in by your main daemon and ordered before it, > but conditions itself out if it already did its job? that's usually > the most robust way, since then it's sufficient to just restart your >

Re: [systemd-devel] Is it possible to let systemd create a listening socket and yet be able to have that socket activate nothing, at least temporarily?

2022-10-07 Thread Klaus Ebbe Grue
Mikulėnas Sendt: 7. oktober 2022 09:51 Til: Klaus Ebbe Grue Cc: systemd-devel@lists.freedesktop.org Emne: Re: [systemd-devel] Is it possible to let systemd create a listening socket and yet be able to have that socket activate nothing, at least temporarily? You don't often get email from graw

Re: [systemd-devel] Is it possible to let systemd create a listening socket and yet be able to have that socket activate nothing, at least temporarily?

2022-10-07 Thread Klaus Ebbe Grue
Hi Michael, > Unfortunately not. You'd need some kind of "maintenance" mode ... Thanks a lot. I will go with the maintenance mode without fearing to have missed some systemd feature. Cheers, Klaus

[systemd-devel] Is it possible to let systemd create a listening socket and yet be able to have that socket activate nothing, at least temporarily?

2022-10-07 Thread Klaus Ebbe Grue
Hi systemd-devel, I have a user question which I take the liberty to send here since "about systemd-devel" says "... it's also OK to direct user questions to this mailing list ...". I have a daemon, /usr/bin/mydaemon, which listens on one and only one TCP port, say , and which does no