mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-05-11 09:48:24 +02:00
git-svn-id: http://svn.ipfire.org/svn/ipfire/IPFire/source@16 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
55
src/patches/ppp_generic-ppp-2.4.3_multilink.patch
Normal file
55
src/patches/ppp_generic-ppp-2.4.3_multilink.patch
Normal file
@@ -0,0 +1,55 @@
|
||||
diff -urN linux-2.5/drivers/net/ppp_generic.c pmac-2.5/drivers/net/ppp_generic.c
|
||||
--- linux-2.5/drivers/net/ppp_generic.c 2004-10-29 07:03:21.000000000 +1000
|
||||
+++ pmac-2.5/drivers/net/ppp_generic.c 2004-11-15 08:53:54.000000000 +1100
|
||||
@@ -19,7 +19,7 @@
|
||||
* PPP driver, written by Michael Callahan and Al Longyear, and
|
||||
* subsequently hacked by Paul Mackerras.
|
||||
*
|
||||
- * ==FILEVERSION 20020217==
|
||||
+ * ==FILEVERSION 20041108==
|
||||
*/
|
||||
|
||||
#include <linux/config.h>
|
||||
@@ -412,6 +412,17 @@
|
||||
ret = 0;
|
||||
if (pf->dead)
|
||||
break;
|
||||
+ if (pf->kind == INTERFACE) {
|
||||
+ /*
|
||||
+ * Return 0 (EOF) on an interface that has no
|
||||
+ * channels connected, unless it is looping
|
||||
+ * network traffic (demand mode).
|
||||
+ */
|
||||
+ struct ppp *ppp = PF_TO_PPP(pf);
|
||||
+ if (ppp->n_channels == 0
|
||||
+ && (ppp->flags & SC_LOOP_TRAFFIC) == 0)
|
||||
+ break;
|
||||
+ }
|
||||
ret = -EAGAIN;
|
||||
if (file->f_flags & O_NONBLOCK)
|
||||
break;
|
||||
@@ -491,6 +502,14 @@
|
||||
mask |= POLLIN | POLLRDNORM;
|
||||
if (pf->dead)
|
||||
mask |= POLLHUP;
|
||||
+ else if (pf->kind == INTERFACE) {
|
||||
+ /* see comment in ppp_read */
|
||||
+ struct ppp *ppp = PF_TO_PPP(pf);
|
||||
+ if (ppp->n_channels == 0
|
||||
+ && (ppp->flags & SC_LOOP_TRAFFIC) == 0)
|
||||
+ mask |= POLLIN | POLLRDNORM;
|
||||
+ }
|
||||
+
|
||||
return mask;
|
||||
}
|
||||
|
||||
@@ -2559,7 +2578,8 @@
|
||||
/* remove it from the ppp unit's list */
|
||||
ppp_lock(ppp);
|
||||
list_del(&pch->clist);
|
||||
- --ppp->n_channels;
|
||||
+ if (--ppp->n_channels == 0)
|
||||
+ wake_up_interruptible(&ppp->file.rwait);
|
||||
ppp_unlock(ppp);
|
||||
if (atomic_dec_and_test(&ppp->file.refcnt))
|
||||
ppp_destroy_interface(ppp);
|
||||
Reference in New Issue
Block a user