aboutsummaryrefslogtreecommitdiff
path: root/sys/net/if_spppsubr.c
diff options
context:
space:
mode:
authorYoshinobu Inoue <shin@FreeBSD.org>1999-12-07 17:39:16 +0000
committerYoshinobu Inoue <shin@FreeBSD.org>1999-12-07 17:39:16 +0000
commitcfa1ca9dfa0ee5bed5cc1cb0b07820701abbb431 (patch)
tree801e5fed92f86a2a376a17c46a0eebebf9174733 /sys/net/if_spppsubr.c
parent07677171f8dabbf0b4b1e3f9fab859f6cca57377 (diff)
downloadsrc-cfa1ca9dfa0ee5bed5cc1cb0b07820701abbb431.tar.gz
src-cfa1ca9dfa0ee5bed5cc1cb0b07820701abbb431.zip
udp IPv6 support, IPv6/IPv4 tunneling support in kernel,
packet divert at kernel for IPv6/IPv4 translater daemon This includes queue related patch submitted by jburkhol@home.com. Submitted by: queue related patch from jburkhol@home.com Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
Notes
Notes: svn path=/head/; revision=54263
Diffstat (limited to 'sys/net/if_spppsubr.c')
-rw-r--r--sys/net/if_spppsubr.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index 133af2b92a8e..e02ef90f238d 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -24,12 +24,14 @@
#if defined(__FreeBSD__) && __FreeBSD__ >= 3
#include "opt_inet.h"
+#include "opt_inet6.h"
#include "opt_ipx.h"
#endif
#ifdef NetBSD1_3
# if NetBSD1_3 > 6
# include "opt_inet.h"
+# include "opt_inet6.h"
# include "opt_iso.h"
# endif
#endif
@@ -572,6 +574,12 @@ sppp_input(struct ifnet *ifp, struct mbuf *m)
inq = &ipintrq;
break;
#endif
+#ifdef INET6
+ case ETHERTYPE_IPV6:
+ schednetisr (NETISR_IPV6);
+ inq = &ip6intrq;
+ break;
+#endif
#ifdef IPX
case ETHERTYPE_IPX:
schednetisr (NETISR_IPX);
@@ -741,6 +749,15 @@ sppp_output(struct ifnet *ifp, struct mbuf *m,
}
break;
#endif
+#ifdef INET6
+ case AF_INET6: /* Internet Protocol */
+ if (sp->pp_mode == IFF_CISCO)
+ h->protocol = htons (ETHERTYPE_IPV6);
+ else {
+ goto nosupport;
+ }
+ break;
+#endif
#ifdef NS
case AF_NS: /* Xerox NS Protocol */
h->protocol = htons (sp->pp_mode == IFF_CISCO ?
@@ -759,8 +776,8 @@ sppp_output(struct ifnet *ifp, struct mbuf *m,
goto nosupport;
h->protocol = htons (PPP_ISO);
break;
-nosupport:
#endif
+nosupport:
default:
m_freem (m);
++ifp->if_oerrors;