patch-2.1.8 linux/drivers/net/ppp.c

Next file: linux/drivers/pci/pci.c
Previous file: linux/drivers/net/3c59x.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.7/linux/drivers/net/ppp.c linux/drivers/net/ppp.c
@@ -136,6 +136,7 @@
 
 static int rcv_proto_ip		(struct ppp *, __u16, __u8 *, int);
 static int rcv_proto_ipx	(struct ppp *, __u16, __u8 *, int);
+static int rcv_proto_ipv6	(struct ppp *, __u16, __u8 *, int);
 static int rcv_proto_vjc_comp	(struct ppp *, __u16, __u8 *, int);
 static int rcv_proto_vjc_uncomp (struct ppp *, __u16, __u8 *, int);
 static int rcv_proto_unknown	(struct ppp *, __u16, __u8 *, int);
@@ -264,6 +265,7 @@
 ppp_proto_type proto_list[] = {
 	{ PPP_IP,	  rcv_proto_ip	       },
 	{ PPP_IPX,	  rcv_proto_ipx	       },
+	{ PPP_IPV6,	  rcv_proto_ipv6       },
 	{ PPP_VJC_COMP,	  rcv_proto_vjc_comp   },
 	{ PPP_VJC_UNCOMP, rcv_proto_vjc_uncomp },
 	{ PPP_LQR,	  rcv_proto_lqr	       },
@@ -1239,6 +1241,18 @@
 }
 
 /*
+ * Process the receipt of an IPV6 frame
+ */
+
+static int
+rcv_proto_ipv6 (struct ppp *ppp, __u16 proto, __u8 * data, int count)
+{
+	if (((ppp2dev (ppp)->flags & IFF_UP) != 0) && (count > 0))
+		return ppp_rcv_rx (ppp, htons (ETH_P_IPV6), data, count);
+	return 0;
+}
+
+/*
  * Process the receipt of an VJ Compressed frame
  */
 
@@ -3102,6 +3116,10 @@
 
 	case ETH_P_IP:
 		answer = ppp_dev_xmit_ip (dev, ppp, data);
+		break;
+
+	case ETH_P_IPV6:
+		answer = ppp_dev_xmit_ipx (dev, ppp, data, len, PPP_IPV6);
 		break;
 
 	default: /* All others have no support at this time. */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov