lkml.org 
[lkml]   [1997]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.1.47 and ppp-2.3.1
On Fri, Jul 25, 1997 at 09:56:23AM -0700, Rob wrote:
> I'm having a problem using ppp2.3.1 with kernel 2.1.47...

I have not tried to compile it myself, but here is a patch that
I have seen. (Though I have installed 2.3.1 with the old ppp-code in
the kernel.)

Florian La Roche


--- linux/ppp.c
+++ linux/ppp.c 1997/07/25 12:02:27
@@ -6,7 +6,7 @@
* Dynamic PPP devices by Jim Freeman <jfree@caldera.com>.
* ppp_tty_receive ``noisy-raise-bug'' fixed by Ove Ewerlid <ewerlid@syscon.uu.se>
*
- * ==FILEVERSION 970626==
+ * ==FILEVERSION 970714==
*
* NOTE TO MAINTAINERS:
* If you modify this file at all, please set the number above to the
@@ -455,7 +455,7 @@
dev->rebuild_header = ppp_dev_rebuild;
#endif

- dev->hard_header_len = PPP_HARD_HDR_LEN;
+ dev->hard_header_len = PPP_HDRLEN;

/* device INFO */
dev->mtu = PPP_MTU;
@@ -2195,7 +2195,7 @@
{
struct ppp *ppp = tty2ppp (tty);
__u8 *new_data;
- int proto;
+ int error;

/*
* Verify the pointers.
@@ -2231,9 +2231,10 @@
/*
* Retrieve the user's buffer
*/
- if (copy_from_user (new_data, data, count)) {
+ COPY_FROM_USER (error, new_data, data, count);
+ if (error) {
kfree (new_data);
- return -EFAULT;
+ return error;
}
/*
* lock this PPP unit so we will be the only writer;
@@ -2266,7 +2267,7 @@
/*
* Send the data
*/
- if (proto == PPP_IP) {
+ if (PPP_PROTOCOL(new_data) == PPP_IP) {
/*
* IP frames can be sent by pppd when we're doing
* demand-dialling. We send them via ppp_dev_xmit_ip
@@ -3257,7 +3258,7 @@
/* try to find an free device */
if_num = 0;
for (ppp = ppp_list; ppp != 0; ppp = ppp->next) {
- if (!set_bit(0, &ppp->inuse))
+ if (!test_and_set_bit(0, &ppp->inuse))
return ppp;
++if_num;
}
\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.033 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site