linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jo l'Indien" <l_indien@magic.fr>
To: paulus@linuxcare.com, callahan@maths.ox.ac.uk, jfree@sovereign.org
Cc: linux-kernel@vger.kernel.org
Subject: Bug in ppp_async.c
Date: Wed, 24 Jan 2001 04:37:21 +0100	[thread overview]
Message-ID: <3A6E4DF1.EE691AF5@magic.fr> (raw)

I found a bug in the 2.4.1-pre10 version of ppp_async.c

In fact, a lot of ioctl are not supported any more,
whih make the pppd start fail.
The bad patch is:

diff -u --recursive --new-file v2.4.0/linux/drivers/net/ppp_async.c
linux/drivers/net/ppp_async.c
--- v2.4.0/linux/drivers/net/ppp_async.c Fri Apr 21 13:31:10 2000
+++ linux/drivers/net/ppp_async.c Mon Jan 15 11:04:57 2001
@@ -259,25 +244,6 @@
   err = 0;
   break;

-/*
- * For now, do the same as the old 2.3 driver useta
- */
- case PPPIOCGFLAGS:
- case PPPIOCSFLAGS:
- case PPPIOCGASYNCMAP:
- case PPPIOCSASYNCMAP:
- case PPPIOCGRASYNCMAP:
- case PPPIOCSRASYNCMAP:
- case PPPIOCGXASYNCMAP:
- case PPPIOCSXASYNCMAP:
- case PPPIOCGMRU:
- case PPPIOCSMRU:
-  err = -EPERM;
-  if (!capable(CAP_NET_ADMIN))
-   break;
-  err = ppp_async_ioctl(&ap->chan, cmd, arg);
-  break;
-
  case PPPIOCATTACH:
  case PPPIOCDETACH:
   err = ppp_channel_ioctl(&ap->chan, cmd, arg);


When I apply this patch back, I got the connection,
but it fail after a few seconds...
In fact, there are two other patches to reverse
in order to make the driver do its job again
(sure it does: I'm using this kind of kernel now...):

diff -u --recursive --new-file v2.4.0/linux/drivers/net/ppp_async.c
linux/drivers/net/ppp_async.c
--- v2.4.0/linux/drivers/net/ppp_async.c Fri Apr 21 13:31:10 2000
+++ linux/drivers/net/ppp_async.c Mon Jan 15 11:04:57 2001
@@ -181,12 +175,7 @@
 ppp_asynctty_read(struct tty_struct *tty, struct file *file,
     unsigned char *buf, size_t count)
 {
- /* For now, do the same as the old 2.3.x code useta */
- struct asyncppp *ap = tty->disc_data;
-
- if (ap == 0)
-  return -ENXIO;
- return ppp_channel_read(&ap->chan, file, buf, count);
+ return -EAGAIN;
 }

 /*

Then:

diff -u --recursive --new-file v2.4.0/linux/drivers/net/ppp_async.c
linux/drivers/net/ppp_async.c
--- v2.4.0/linux/drivers/net/ppp_async.c Fri Apr 21 13:31:10 2000
+++ linux/drivers/net/ppp_async.c Mon Jan 15 11:04:57 2001
@@ -203,12 +193,7 @@
 ppp_asynctty_write(struct tty_struct *tty, struct file *file,
      const unsigned char *buf, size_t count)
 {
- /* For now, do the same as the old 2.3.x code useta */
- struct asyncppp *ap = tty->disc_data;
-
- if (ap == 0)
-  return -ENXIO;
- return ppp_channel_write(&ap->chan, buf, count);
+ return -EAGAIN;
 }

 static int

Without these modifications, everything is allright !

Jocelyn Mayer

PS: sorry, but I don't know who is the actual maitainer of this
driver...
ý:.žË›±Êâmçë¢kaŠÉb²ßìzwm…ébïîžË›±Êâmébžìÿ‘êçz_âžØ^n‡r¡ö¦zË\x1aëh™¨è­Ú&£ûàz¿äz¹Þ—ú+€ù^jÇ«y§m…á@A«a¶Úÿÿü0ÃûnÇú+ƒùd

             reply	other threads:[~2001-01-24  3:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-24  3:37 Jo l'Indien [this message]
2001-01-24  5:04 ` Bug in ppp_async.c Paul Mackerras
2001-01-24  7:01   ` Albert D. Cahalan
2001-01-24  8:42     ` David Woodhouse
2001-01-24  9:45   ` Paul Mackerras
2001-01-24 18:03     ` Dan Egli
2001-01-26  5:17     ` Albert D. Cahalan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A6E4DF1.EE691AF5@magic.fr \
    --to=l_indien@magic.fr \
    --cc=callahan@maths.ox.ac.uk \
    --cc=jfree@sovereign.org \
    --cc=jma@netgem.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@linuxcare.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).