[PATCH] ppp fixes, new pppd version out

From: Paul Mackerras (paulus@linuxcare.com)
Date: Fri Apr 14 2000 - 00:12:57 EST


The following patch against 2.3.99-pre6-2 fixes a couple more bugs in the
ppp_generic driver and updates Documentation/Changes to point to the
ppp-2.4.0b1 release for pppd, which I have just put up on my ftp site.

Paul.

diff -urN official/Documentation/Changes linux/Documentation/Changes
--- official/Documentation/Changes Wed Apr 12 09:38:52 2000
+++ linux/Documentation/Changes Fri Apr 14 15:08:28 2000
@@ -62,7 +62,7 @@
 - Bash 1.14.7 ; bash -version
 - Ncpfs 2.2.0 ; ncpmount -v
 - Pcmcia-cs 3.1.2 ; cardmgr -V
-- PPP 2.3.11 ; pppd --version
+- PPP 2.4.0b1 ; pppd --version
 - Util-linux 2.9i ; chsh -v
 - isdn4k-utils v3.1beta7 ; isdnctrl 2>&1|grep version
 
@@ -391,22 +391,33 @@
 PPP
 ===
 
- Due to changes in the PPP driver and routing code, those of you
+ The PPP driver has been restructured to support multilink and
+to enable it to operate over diverse kinds of media. Those of you
 using PPP networking will need to upgrade your pppd to at least
-version 2.3.11. See ftp://cs.anu.edu.au/pub/software/ppp/ for newest
-versions.
+version 2.4.0b1. See ftp://linuxcare.com.au/pub/ppp/ for the latest
+version.
 
- You must make sure that the special device file /dev/ppp exists.
-It can be made by executing this command as root:
+ If you are not using devfs, you must make sure that the special
+device file /dev/ppp exists. It can be made by executing this command
+as root:
 
         mknod /dev/ppp c 108 0
 
    If you have built ppp support as modules, you should put the lines
-below in your /etc/modules.conf file. I assume you want asynchronous
-ppp; replace ppp_async by ppp_synctty if you want synchronous ppp.
+below in your /etc/modules.conf file.
 
- alias char-major-108 ppp_generic
- alias tty-ldisc-3 ppp_async
+ alias char-major-108 ppp_generic
+ alias /dev/ppp ppp_generic
+ alias tty-ldisc-3 ppp_async
+ alias tty-ldisc-14 ppp_synctty
+ alias ppp-compress-21 bsd_comp
+ alias ppp-compress-24 ppp_deflate
+ alias ppp-compress-26 ppp_deflate
+
+If you are using devfsd and you have ppp_generic as a module, put the
+following line in your /etc/devfsd.conf:
+
+ LOOKUP ppp MODLOAD
 
 iBCS
 ====
@@ -723,8 +734,8 @@
 PPP
 ===
 
-The 2.3.11 release:
-ftp://cs.anu.edu.au/pub/software/ppp/ppp-2.3.11.tar.gz
+The 2.4.0b1 release:
+ftp://linuxcare.com.au/pub/ppp/ppp-2.4.0b1.tar.gz
 
 IP Chains
 =========
diff -urN official/drivers/net/ppp_generic.c linux/drivers/net/ppp_generic.c
--- official/drivers/net/ppp_generic.c Thu Apr 13 10:25:09 2000
+++ linux/drivers/net/ppp_generic.c Thu Apr 13 17:15:13 2000
@@ -19,7 +19,7 @@
  * PPP driver, written by Michael Callahan and Al Longyear, and
  * subsequently hacked by Paul Mackerras.
  *
- * ==FILEVERSION 20000406==
+ * ==FILEVERSION 20000412==
  */
 
 #include <linux/config.h>
@@ -206,7 +206,7 @@
                               size_t count);
 static int ppp_unattached_ioctl(struct ppp_file *pf, struct file *file,
                                 unsigned int cmd, unsigned long arg);
-static void ppp_xmit_process(struct ppp *ppp, int wakeup);
+static void ppp_xmit_process(struct ppp *ppp);
 static void ppp_send_frame(struct ppp *ppp, struct sk_buff *skb);
 static void ppp_push(struct ppp *ppp);
 static void ppp_channel_push(struct channel *pch);
@@ -427,7 +427,7 @@
 
         switch (pf->kind) {
         case INTERFACE:
- ppp_xmit_process(PF_TO_PPP(pf), 0);
+ ppp_xmit_process(PF_TO_PPP(pf));
                 break;
         case CHANNEL:
                 ppp_channel_push(PF_TO_CHANNEL(pf));
@@ -774,7 +774,7 @@
 
         netif_stop_queue(dev);
         skb_queue_tail(&ppp->file.xq, skb);
- ppp_xmit_process(ppp, 0);
+ ppp_xmit_process(ppp);
         return 0;
 
  outf:
@@ -860,13 +860,12 @@
  * that can now be done.
  */
 static void
-ppp_xmit_process(struct ppp *ppp, int wakeup)
+ppp_xmit_process(struct ppp *ppp)
 {
         struct sk_buff *skb;
 
         ppp_xmit_lock(ppp);
- if (wakeup)
- ppp_push(ppp);
+ ppp_push(ppp);
         while (ppp->xmit_pending == 0
                && (skb = skb_dequeue(&ppp->file.xq)) != 0)
                 ppp_send_frame(ppp, skb);
@@ -1018,14 +1017,12 @@
                 spin_lock_bh(&pch->downl);
                 if (pch->chan) {
                         if (pch->chan->ops->start_xmit(pch->chan, skb))
- skb = 0;
+ ppp->xmit_pending = 0;
                 } else {
                         /* channel got unregistered */
                         kfree_skb(skb);
- skb = 0;
- }
- if (skb_queue_len(&pch->file.xq) == 0 && skb == 0)
                         ppp->xmit_pending = 0;
+ }
                 spin_unlock_bh(&pch->downl);
                 return;
         }
@@ -1196,6 +1193,7 @@
 ppp_channel_push(struct channel *pch)
 {
         struct sk_buff *skb;
+ struct ppp *ppp;
 
         spin_lock_bh(&pch->downl);
         if (pch->chan != 0) {
@@ -1212,6 +1210,14 @@
                 skb_queue_purge(&pch->file.xq);
         }
         spin_unlock_bh(&pch->downl);
+ /* see if there is anything from the attached unit to be sent */
+ if (skb_queue_len(&pch->file.xq) == 0) {
+ read_lock_bh(&pch->upl);
+ ppp = pch->ppp;
+ if (ppp != 0)
+ ppp_xmit_process(ppp);
+ read_unlock_bh(&pch->upl);
+ }
 }
 
 /*
@@ -1792,18 +1798,10 @@
 ppp_output_wakeup(struct ppp_channel *chan)
 {
         struct channel *pch = chan->ppp;
- struct ppp *ppp;
 
         if (pch == 0)
                 return;
         ppp_channel_push(pch);
- if (skb_queue_len(&pch->file.xq) == 0) {
- read_lock_bh(&pch->upl);
- ppp = pch->ppp;
- if (ppp != 0)
- ppp_xmit_process(ppp, 1);
- read_unlock_bh(&pch->upl);
- }
 }
 
 /*

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



This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:23 EST