Re: Stunnel 5.44 server side 'exec = pppd' runs second child 'pppd' process after reconnection. Bug?

Peter Pentchev <[email protected]> Tue, 14 May 2019 11:15:26 +0300
Newsgroups gmane.network.stunnel.user
Message-ID <[email protected]>
On Mon, May 13, 2019 at 03:03:55PM -0700, Eric Eberhard wrote:
> [Martin Got wrote:]
> > I'm trying to make stunnel wrapped ppp connection to achieve bidirectional data transfer over stunnel like shown below.
> >  
> > Stunnel client   --connect-->    Stunnel server
> > pppd client       --connect-->    pppd server
> > 10.0.1.2             <--data-->     10.0.1.1
> >  
> > OpenBSD 6.4amd64 with Stunnel 5.44 server works till stunnel retries 'exec = pppd' section once stunnel client is reconnected. Also 'exec = pppd' section retries after a short network related communication lag also. Previous 'pppd' child instance haven't killed by stunnel 5.44 before new instance started.
> >  
> > So second 'pppd' process started and runs simultaneously with the first 'pppd' and link down. Restarting Stunnel server can clear child 'pppd' processes. So newly reestablished 'pppd' link between 10.0.1.1 <--> 10.0.1.2 endpoints works till next interconnection.
> >  
> > Does stunnel server have an option to start only one instance in 'exec' section or what should be done to fix this?
> >  
> > Any suggestions highly appreciated.
> 
> Yes.  Use inetd (or equivalent).  Making an independent server work is
> difficult due to the problems like you are having.  Inetd is in many O/S
> included and essential, others available.  It always works.  Always.
> Yes, there is a tiny amount of overhead for making connections.  On an
> ancient AIX IBM I manage 2-4 million XML documents exchanged per day
> with no problems, all with inetd.  Try it – save yourself some misery.
> Or maybe it won’t help at all except to add information :) 

(format recovered; top-posting hard to follow)

Hi Eric,

Over the past couple of years I've seen you suggesting that people use
inetd + stunnel in inetd mode instead of stunnel to accept connections.
In some situations, like this one, it is not at all relevant to the
problem at hand - even if the original poster would use inetd to accept
an incoming TCP connection and then run stunnel in inetd mode, this
would *still* be a new instance of stunnel that will run a new instance
of pppd with exactly the same problems as described in the message that
you replied to. Even more so, if stunnel is started in inetd mode, it
has absolutely no idea whether there are any other instances of
stunnel+pppd already running, so it might be said that in this case
using inetd would make the situation worse.

G'luck,
Peter

-- 
Peter Pentchev  roam@{ringlet.net,debian.org,FreeBSD.org} [email protected]
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13

_______________________________________________
stunnel-users mailing list
[email protected]
https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEELuenpRf8EkzxFcNUZR7vsCUn3xMFAlzaeRgACgkQZR7vsCUn
3xNf7Q/+KVn1wnlwqmNHvi1MDeM0HFLXJVTGmvAxahkB1cWO4aXsQczqjSekGI5U
CcZmy75hC11pPg82FloM6N60P21P4d9RpdNSU7D5avLZJdpv1SUo8VB7pgmae0XW
q8ODlcxKnoLbjhskL3pqsha40sQgzj3hg8UxVu5WHdjLzbs8kl2W5+q1ChmXdkpa
rbvogt9QLRvgoagYF9lgZFtPCLUq2pjRtMkqYY6/tfh25Ld50mYHzkiNopzxCnUA
v6NGT2lNLH/hDbwNzZ8b21lqA5KiuHAkMkYXetzxUPygPDbWhtpOEeNCfw/wJmzH
dTchByw7/QZg7EjI6J3GA7mKgZx5yzH3F5/M3G7P2pCHx4euTlQr08Rsb906losA
rcAA4ScXA8mMdZCto7HtoksG8SlVSpSIyQVFc2RVigeowm9qOG4PntWTiGbzHM+v
x87n+LTx4PuAqWlIjiVdUGR6z3bIn0Galdr8XFAhgmWVByAZnVadb0gFjP2hVvwL
3YQHhnw5jQ7gX70cNCQ4N58jA1KJrG/IPsMFp5DphqXRgfbeWSOmZA6Pll7MkNi1
4CjT/z/wJ797W8y7JYwd9bjccmOh9IQcd/0hy9DPHN/1YiBVZnPrgc308AR/eH0e
GYRlGo0FPPZfNcoJGnBT+HcZ2TkLaXYN5rcLt6jTNJDZ1TprwsM=
=7X7K
-----END PGP SIGNATURE-----