summaryrefslogtreecommitdiffstats
path: root/drivers/net/ppp.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-02-15 02:15:32 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-02-15 02:15:32 +0000
commit86464aed71025541805e7b1515541aee89879e33 (patch)
treee01a457a4912a8553bc65524aa3125d51f29f810 /drivers/net/ppp.c
parent88f99939ecc6a95a79614574cb7d95ffccfc3466 (diff)
Merge with Linux 2.2.1.
Diffstat (limited to 'drivers/net/ppp.c')
-rw-r--r--drivers/net/ppp.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/drivers/net/ppp.c b/drivers/net/ppp.c
index c578ba87d..b2c07b3fa 100644
--- a/drivers/net/ppp.c
+++ b/drivers/net/ppp.c
@@ -4,7 +4,7 @@
* Al Longyear <longyear@netcom.com>
* Extensively rewritten by Paul Mackerras <paulus@cs.anu.edu.au>
*
- * ==FILEVERSION 981004==
+ * ==FILEVERSION 990114==
*
* NOTE TO MAINTAINERS:
* If you modify this file at all, please set the number above to the
@@ -1216,6 +1216,7 @@ typedef struct ppp_proto_struct {
} ppp_proto_type;
static int rcv_proto_ip (struct ppp *, struct sk_buff *);
+static int rcv_proto_ipv6 (struct ppp *, struct sk_buff *);
static int rcv_proto_ipx (struct ppp *, struct sk_buff *);
static int rcv_proto_at (struct ppp *, struct sk_buff *);
static int rcv_proto_vjc_comp (struct ppp *, struct sk_buff *);
@@ -1226,6 +1227,7 @@ static int rcv_proto_unknown (struct ppp *, struct sk_buff *);
static
ppp_proto_type proto_list[] = {
{ PPP_IP, rcv_proto_ip },
+ { PPP_IPV6, rcv_proto_ipv6 },
{ PPP_IPX, rcv_proto_ipx },
{ PPP_AT, rcv_proto_at },
{ PPP_VJC_COMP, rcv_proto_vjc_comp },
@@ -2003,6 +2005,19 @@ rcv_proto_ip(struct ppp *ppp, struct sk_buff *skb)
}
/*
+ * Process the receipt of an IPv6 frame
+ */
+static int
+rcv_proto_ipv6(struct ppp *ppp, struct sk_buff *skb)
+{
+ CHECK_PPP(0);
+ if ((ppp2dev(ppp)->flags & IFF_UP) && (skb->len > 0)
+ && ppp->sc_npmode[NP_IPV6] == NPMODE_PASS)
+ return ppp_rcv_rx(ppp, ETH_P_IPV6, skb);
+ return 0;
+}
+
+/*
* Process the receipt of an IPX frame
*/
static int
@@ -2041,7 +2056,7 @@ rcv_proto_vjc_comp(struct ppp *ppp, struct sk_buff *skb)
return 0;
new_count = slhc_uncompress(ppp->slcomp, skb->data + PPP_HDRLEN,
skb->len - PPP_HDRLEN);
- if (new_count < 0) {
+ if (new_count<=0) {
if (ppp->flags & SC_DEBUG)
printk(KERN_NOTICE
"ppp: error in VJ decompression\n");
@@ -2383,6 +2398,10 @@ ppp_dev_xmit(struct sk_buff *skb, struct device *dev)
proto = PPP_IP;
npmode = ppp->sc_npmode[NP_IP];
break;
+ case ETH_P_IPV6:
+ proto = PPP_IPV6;
+ npmode = ppp->sc_npmode[NP_IPV6];
+ break;
case ETH_P_IPX:
proto = PPP_IPX;
npmode = ppp->sc_npmode[NP_IPX];