]> git.ozlabs.org Git - ppp.git/commit - pppd/sys-linux.c
pppd: Be sure to close /dev/ppp when reconnecting (#184)
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Thu, 31 Dec 2020 04:28:19 +0000 (05:28 +0100)
committerGitHub <noreply@github.com>
Thu, 31 Dec 2020 04:28:19 +0000 (15:28 +1100)
commit05bcf644849fd9fb77bf682c996e568ee9ad3a47
treebbb4cf68a8601021a3e537559ac4edc6acbc3bd8
parent506e9a3461ec4956215a2477cfde9c7233323173
pppd: Be sure to close /dev/ppp when reconnecting (#184)

From https://bugs.debian.org/306261

When using the kernel PPPoE driver, pppd never
closes /dev/ppp when the link has come down.

It opens superfluous fds to the device each time it re-opens the
connection, with the unclosed ones falsely reported always ready for
data by select().

This makes pppd eat up 100% CPU time after the first persist because of
the always instantly returning select() on the unclosed fds.

The problem also occurs with the upstream version, but does not occur
when a pty/tty device is used for the ppp connection.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Co-authored-by: Simon Peter <dn.tlp@gmx.net>
pppd/sys-linux.c