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

Florian Lohoff <[email protected]> Wed, 15 May 2019 00:22:20 +0200
Newsgroups gmane.network.stunnel.user
Organization rfc822 - pure communication
Message-ID <[email protected]>
On Tue, May 14, 2019 at 11:30:29AM -0700, Eric Eberhard wrote:
> That is not a bad idea.  I'd wrap it in a C program so I could check
> if the pppd is alive and not a zombie.  BUT -- it begs the question,
> why only ONE?  Every time this happens the process ID would change.
> Is it serialization or?  I am thinking there is something we don't
> know ... I have offered Martin some help ...

pppd is a pretty solid piece of software. Never seen it hang as a
zombie.

Only one because for a given static ip address you can only use
it once - Given that your static ip address is bound to a specific
peer name you should kill all other pppd's for that peer. 

Abusing either "linkname" to get pppd to write a pid file with
a known pid file or finding the right pid file with
the route which points to the interface which is part of
the default pid file name.

So we can find the "other" pppd still running because it did
not yet detect the tcp sessions with stunnel beeing disconnected.

This is what the lcp echo feature is for. pppd will send echo frames
in the Link Control Protocol (LCP) on a regular basis if there
is no incoming traffic. Missing the echo reply will lead pppd
to terminate and free up the interface and through that the
static ip address assigned to that peer.

Flo
-- 
Florian Lohoff                                                 [email protected]
        UTF-8 Test: The 🐈 ran after a 🐁, but the 🐁 ran away

_______________________________________________
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-----

iQIzBAABCgAdFiEEdb9o7oebX2papQ/KkN1BIMsJ8i8FAlzbP5oACgkQkN1BIMsJ
8i/y8A/9F9gtwfzagoIy/czFaVsPZWphT/beCNwyVqpb6xnT6WutpGYHa1kMbzLs
ACQZ+L6jAf+vLhjlHpBjPZff+tq8wMoNOcx0YTbr827fBJY/9hjFApmJpgf1TDD6
OYDPgbURQuAkmp2uVa8b+6dMlf+xxaUCk/0+6XVU40OitB3+5er13/3tScRpWzPJ
64GcMkV6+D6Zs6Bsu+vIbK5HM9xJsNvmkZc41LWty6M/7eHGldW2glGakBNRyxGS
ugj9gorn6K7mfp+KtAEb3vn3gYijAFjtUvFpDWDoGAxG8t1P4SIEB48ciM998fbn
SGSSaqpdDZMfqB8Kdwmoiqmco6d0/w+p7iWbrkPCWjymTzBsb8fhWsFJFptOCCQM
tZzpOciDLRwr/ORlaIr7i8CwUb199BZU9wGpTuDk6s8aWkR4DXws2Ill1qZuPP6u
HO2DYqJ9VWa+y1DlsNKuKJaHS8yWyJQ6+YlJLky88AGMWJVhsWb2wvRZW1/h80Vq
Sn2xyQpXAtFgLgzVXHMQ5EdIVwTA37OI1vjgCVrYghKI9GzHf4/ZygTQ9svFmtx/
t1NPu+432sU5fnIue+pkjv0FDkrs2o8VbmGxo32ngcmLtOMrWK45Y/o6rXku7Rz4
hP4L4W/FQhPufhz97/4BTqxjWoX3TOUqijS8OnmiEeccMS7e9Sw=
=/Lu0
-----END PGP SIGNATURE-----