]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/sys-linux.c
don't need version number in here
[ppp.git] / pppd / sys-linux.c
index c63ac9a5d9a0cf8a9918b1941b5f6f653adaea39..94c31ddc441f25b8d45d9052c39297f86fa86fb8 100644 (file)
@@ -381,14 +381,15 @@ int establish_ppp (int tty_fd)
 
 void disestablish_ppp(int tty_fd)
 {
+    if (!hungup) {
 /*
- * Attempt to restore the previous tty settings
+ * Flush the tty output buffer so that the TIOCSETD doesn't hang.
  */
-    if (!hungup) {
+       if (tcflush(tty_fd, TCIOFLUSH) < 0)
+           warn("tcflush failed: %m");
 /*
  * Restore the previous line discipline
  */
-       tcflush(tty_fd, TCIOFLUSH);
        if (ioctl(tty_fd, TIOCSETD, &tty_disc) < 0) {
            if ( ! ok_error (errno))
                error("ioctl(TIOCSETD, N_TTY): %m");
@@ -1609,9 +1610,11 @@ int ppp_available(void)
 
     no_ppp_msg = 
        "This system lacks kernel support for PPP.  This could be because\n"
-       "the PPP kernel module is not loaded, or because the kernel is\n"
-       "not configured for PPP.  See the README.linux file in the\n"
-       "ppp-2.3.7 distribution.\n";
+       "the PPP kernel module could not be loaded, or because PPP was not\n"
+       "included in the kernel configuration.  If PPP was included as a\n"
+       "module, try `/sbin/modprobe -v ppp'.  If that fails, check that\n"
+       "ppp.o exists in /lib/modules/`uname -r`/net.\n"
+       "See README.linux file in the ppp distribution for more details.\n";
 
 /*
  * Open a socket for doing the ioctl operations.