public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Bug in ppp_async.c
@ 2001-01-24  3:37 Jo l'Indien
  2001-01-24  5:04 ` Paul Mackerras
  0 siblings, 1 reply; 7+ messages in thread
From: Jo l'Indien @ 2001-01-24  3:37 UTC (permalink / raw)
  To: paulus, callahan, jfree; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bug in ppp_async.c
  2001-01-24  3:37 Bug in ppp_async.c Jo l'Indien
@ 2001-01-24  5:04 ` Paul Mackerras
  2001-01-24  7:01   ` Albert D. Cahalan
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Mackerras @ 2001-01-24  5:04 UTC (permalink / raw)
  To: l_indien, jma; +Cc: callahan, jfree, linux-kernel

Jo l'Indien writes:

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

I'll bet you're using an old pppd.  You need version 2.4.0 of pppd,
available from ftp://linuxcare.com.au/pub/ppp/, as documented in the
Documentation/Changes file.

> PS: sorry, but I don't know who is the actual maitainer of this
> driver...

Me.

-- 
Paul Mackerras, Open Source Research Fellow, Linuxcare, Inc.
+61 2 6262 8990 tel, +61 2 6262 8991 fax
paulus@linuxcare.com.au, http://www.linuxcare.com.au/
Linuxcare.  Support for the revolution.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bug in ppp_async.c
  2001-01-24  5:04 ` Paul Mackerras
@ 2001-01-24  7:01   ` Albert D. Cahalan
  2001-01-24  8:42     ` David Woodhouse
  2001-01-24  9:45     ` Paul Mackerras
  0 siblings, 2 replies; 7+ messages in thread
From: Albert D. Cahalan @ 2001-01-24  7:01 UTC (permalink / raw)
  To: paulus; +Cc: l_indien, jma, callahan, jfree, linux-kernel

Paul Mackerras writes:
> Jo l'Indien writes:

>> 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.
>
> I'll bet you're using an old pppd.  You need version 2.4.0 of pppd,
> available from ftp://linuxcare.com.au/pub/ppp/, as documented in the
> Documentation/Changes file.

Even Red Hat 7 only has the 2.3.11 version.

The 2.4.xx series is supposed to be stable. If there is any way
you could add a compatibility hack, please do so.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bug in ppp_async.c
  2001-01-24  7:01   ` Albert D. Cahalan
@ 2001-01-24  8:42     ` David Woodhouse
  2001-01-24  9:45     ` Paul Mackerras
  1 sibling, 0 replies; 7+ messages in thread
From: David Woodhouse @ 2001-01-24  8:42 UTC (permalink / raw)
  To: Albert D. Cahalan; +Cc: paulus, l_indien, jma, callahan, jfree, linux-kernel

On Wed, 24 Jan 2001, Albert D. Cahalan wrote:

> Paul Mackerras writes:
> > I'll bet you're using an old pppd.  You need version 2.4.0 of pppd,
> > available from ftp://linuxcare.com.au/pub/ppp/, as documented in the
> > Documentation/Changes file.
> 
> Even Red Hat 7 only has the 2.3.11 version.

That's probably because Red Hat 7 didn't ship with a 2.4.0 kernel.

> The 2.4.xx series is supposed to be stable. If there is any way
> you could add a compatibility hack, please do so.

The 2.4.0 Documentation/Changes file already said that pppd should be at
least v2.4.0. That hasn't changed, AFAICT.

-- 
dwmw2


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bug in ppp_async.c
  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
  1 sibling, 2 replies; 7+ messages in thread
From: Paul Mackerras @ 2001-01-24  9:45 UTC (permalink / raw)
  To: Albert D. Cahalan; +Cc: l_indien, jma, jfree, linux-kernel

Albert D. Cahalan writes:

> Even Red Hat 7 only has the 2.3.11 version.
> 
> The 2.4.xx series is supposed to be stable. If there is any way
> you could add a compatibility hack, please do so.

Stable != backwards compatible to the year dot.  ppp-2.4.0 has been
out for over 5 months now.  Adding the compatibility stuff back in
would make the PPP subsystem much more complicated and less robust.
And pppd is not the only thing you would have to upgrade if you are
using a 2.4.0 with Red Hat 7.0 - I would expect that you would also at
least have to upgrade modutils, and switch over from ipchains to
iptables if you use the netfilter stuff.

Paul.

-- 
Paul Mackerras, Open Source Research Fellow, Linuxcare, Inc.
+61 2 6262 8990 tel, +61 2 6262 8991 fax
paulus@linuxcare.com.au, http://www.linuxcare.com.au/
Linuxcare.  Support for the revolution.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bug in ppp_async.c
  2001-01-24  9:45     ` Paul Mackerras
@ 2001-01-24 18:03       ` Dan Egli
  2001-01-26  5:17       ` Albert D. Cahalan
  1 sibling, 0 replies; 7+ messages in thread
From: Dan Egli @ 2001-01-24 18:03 UTC (permalink / raw)
  To: linux-kernel

I do ppp using 2.4.0 w/ redhat 7 now, no upgrades besides modultils and the
kernel :>
-- Dan Egli
-- Network Administrator / President
-- Frankenstein Computers
-- 801-671-7875
----- Original Message -----
From: "Paul Mackerras" <paulus@linuxcare.com.au>
To: "Albert D. Cahalan" <acahalan@cs.uml.edu>
Cc: <l_indien@magic.fr>; <jma@netgem.com>; <jfree@sovereign.org>;
<linux-kernel@vger.kernel.org>
Sent: Wednesday, January 24, 2001 2:45 AM
Subject: Re: Bug in ppp_async.c


> Albert D. Cahalan writes:
>
> > Even Red Hat 7 only has the 2.3.11 version.
> >
> > The 2.4.xx series is supposed to be stable. If there is any way
> > you could add a compatibility hack, please do so.
>
> Stable != backwards compatible to the year dot.  ppp-2.4.0 has been
> out for over 5 months now.  Adding the compatibility stuff back in
> would make the PPP subsystem much more complicated and less robust.
> And pppd is not the only thing you would have to upgrade if you are
> using a 2.4.0 with Red Hat 7.0 - I would expect that you would also at
> least have to upgrade modutils, and switch over from ipchains to
> iptables if you use the netfilter stuff.
>
> Paul.
>
> --
> Paul Mackerras, Open Source Research Fellow, Linuxcare, Inc.
> +61 2 6262 8990 tel, +61 2 6262 8991 fax
> paulus@linuxcare.com.au, http://www.linuxcare.com.au/
> Linuxcare.  Support for the revolution.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> Please read the FAQ at http://www.tux.org/lkml/
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bug in ppp_async.c
  2001-01-24  9:45     ` Paul Mackerras
  2001-01-24 18:03       ` Dan Egli
@ 2001-01-26  5:17       ` Albert D. Cahalan
  1 sibling, 0 replies; 7+ messages in thread
From: Albert D. Cahalan @ 2001-01-26  5:17 UTC (permalink / raw)
  To: paulus; +Cc: Albert D. Cahalan, l_indien, jma, jfree, linux-kernel

Paul Mackerras writes:
> Albert D. Cahalan writes:

>> Even Red Hat 7 only has the 2.3.11 version.
>>
>> The 2.4.xx series is supposed to be stable. If there is
>> any way you could add a compatibility hack, please do so.
>
> Stable != backwards compatible to the year dot.

I know. It means that you don't break the API between 2.4.0
and 2.4.1 though. It means you don't break distributions that
were supposed to be ready for the 2.4.xx kernels.

> ppp-2.4.0 has been
> out for over 5 months now.

That is less than the typical time between releases of
a normal Linux distribution.

> Adding the compatibility stuff back in
> would make the PPP subsystem much more complicated and less robust.

I wouldn't be asking you to add it back if you hadn't
removed it. It was already there.

I don't trust that the new version will be a drop-in replacement
due to past experiences, and I wonder if my 2.0.xx kernel will
still be supported by the new user-space code. So this sucks.

> And pppd is not the only thing you would have to upgrade if you are
> using a 2.4.0 with Red Hat 7.0 - I would expect that you would also at
> least have to upgrade modutils, and switch over from ipchains to
> iptables if you use the netfilter stuff.

Nope, the network people even offer some Linux 2.0 compatibility.
That dates back many years! Hey, I like your example.

For modutils, there was a security problem anyway.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-01-26  5:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-24  3:37 Bug in ppp_async.c Jo l'Indien
2001-01-24  5:04 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox