summaryrefslogtreecommitdiff
path: root/sys/net/if_ethersubr.c
diff options
context:
space:
mode:
authorYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2010-01-11 03:50:57 +0000
committerYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2010-01-11 03:50:57 +0000
commit07b6c47bf3506b1d17f7c5d0a4996c64403ffe9d (patch)
treeea4224e3fe2f8a4cbf4fc9276d2aee2660988032 /sys/net/if_ethersubr.c
parent944b7335f573c141a17ea60164543855f70a2e2e (diff)
Initial import PIPEX. PIPEX(Pppac IP EXtension) is a IP forwarding
acceleration for PPP access concentrator. ok mcbride@ dlg@ deraadt@ reyk@.
Diffstat (limited to 'sys/net/if_ethersubr.c')
-rw-r--r--sys/net/if_ethersubr.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 1cdb60d0287..595355fba0d 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ethersubr.c,v 1.136 2009/11/03 10:59:04 claudio Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.137 2010/01/11 03:50:56 yasuoka Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
@@ -147,6 +147,10 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>.
#include <netinet6/nd6.h>
#endif
+#ifdef PIPEX
+#include <net/pipex.h>
+#endif
+
#ifdef NETATALK
#include <netatalk/at.h>
#include <netatalk/at_var.h>
@@ -736,7 +740,7 @@ decapsulate:
aarpinput((struct arpcom *)ifp, m);
goto done;
#endif
-#if NPPPOE > 0
+#if NPPPOE > 0 || defined(PIPEX)
case ETHERTYPE_PPPOEDISC:
case ETHERTYPE_PPPOE:
/* XXX we dont have this flag */
@@ -758,7 +762,16 @@ decapsulate:
eh_tmp = mtod(m, struct ether_header *);
bcopy(eh, eh_tmp, sizeof(struct ether_header));
+#ifdef PIPEX
+ {
+ struct pipex_session *session;
+ if ((session = pipex_pppoe_lookup_session(m)) != NULL) {
+ pipex_pppoe_input(m, session);
+ return;
+ }
+ }
+#endif
if (etype == ETHERTYPE_PPPOEDISC)
inq = &pppoediscinq;
else
@@ -766,7 +779,7 @@ decapsulate:
schednetisr(NETISR_PPPOE);
break;
-#endif /* NPPPOE > 0 */
+#endif /* NPPPOE > 0 || defined(PIPEX) */
#ifdef AOE
case ETHERTYPE_AOE:
aoe_input(ifp, m);