Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet6 Make the EtherIP in IPv6 input path work.



details:   https://anonhg.NetBSD.org/src/rev/58846a5fc72c
branches:  trunk
changeset: 757290:58846a5fc72c
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Tue Aug 24 00:07:00 2010 +0000

description:
Make the EtherIP in IPv6 input path work.
XXX: Figure out if we really need a separate protosw for IPv6.

diffstat:

 sys/netinet6/in6_proto.c   |   8 ++++----
 sys/netinet6/ip6_etherip.c |  16 ++++++----------
 sys/netinet6/ip6_etherip.h |   4 ++--
 3 files changed, 12 insertions(+), 16 deletions(-)

diffs (95 lines):

diff -r d3f21a31651d -r 58846a5fc72c sys/netinet6/in6_proto.c
--- a/sys/netinet6/in6_proto.c  Mon Aug 23 20:56:27 2010 +0000
+++ b/sys/netinet6/in6_proto.c  Tue Aug 24 00:07:00 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in6_proto.c,v 1.88 2010/02/04 21:48:35 joerg Exp $     */
+/*     $NetBSD: in6_proto.c,v 1.89 2010/08/24 00:07:00 jakllsch Exp $  */
 /*     $KAME: in6_proto.c,v 1.66 2000/10/10 15:35:47 itojun Exp $      */
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in6_proto.c,v 1.88 2010/02/04 21:48:35 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6_proto.c,v 1.89 2010/08/24 00:07:00 jakllsch Exp $");
 
 #include "opt_gateway.h"
 #include "opt_inet.h"
@@ -129,7 +129,7 @@
 #endif
 
 #include "etherip.h"
-#if NETHERIP > 1
+#if NETHERIP > 0
 #include <netinet6/ip6_etherip.h>
 #endif
 
@@ -339,7 +339,7 @@
        .pr_usrreq = rip6_usrreq,
        .pr_init = encap_init,
 },
-#if NETHERIP > 1
+#if NETHERIP > 0
 {      .pr_type = SOCK_RAW,
        .pr_domain = &inet6domain,
        .pr_protocol = IPPROTO_ETHERIP,
diff -r d3f21a31651d -r 58846a5fc72c sys/netinet6/ip6_etherip.c
--- a/sys/netinet6/ip6_etherip.c        Mon Aug 23 20:56:27 2010 +0000
+++ b/sys/netinet6/ip6_etherip.c        Tue Aug 24 00:07:00 2010 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: ip6_etherip.c,v 1.13 2010/04/05 07:22:50 joerg Exp $        */
+/*      $NetBSD: ip6_etherip.c,v 1.14 2010/08/24 00:07:00 jakllsch Exp $        */
 
 /*
  *  Copyright (c) 2006, Hans Rosenfeld <rosenfeld%grumpf.hope-2000.org@localhost>
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_etherip.c,v 1.13 2010/04/05 07:22:50 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_etherip.c,v 1.14 2010/08/24 00:07:00 jakllsch Exp $");
 
 #include "opt_inet.h"
 
@@ -188,19 +188,15 @@
 }
 
 int
-ip6_etherip_input(struct mbuf *m, ...)
+ip6_etherip_input(struct mbuf **mp, int *offp, int proto)
 {
+       struct mbuf *m = *mp;
+       int off = *offp;
        struct etherip_softc *sc;
        const struct ip6_hdr *ip6;
        struct sockaddr_in6 *src6, *dst6;
        struct ifnet *ifp = NULL;
-       int off, proto, s;
-       va_list ap;
-
-       va_start(ap, m);
-       off = va_arg(ap, int);
-       proto = va_arg(ap, int);
-       va_end(ap);
+       int s;
 
        if (proto != IPPROTO_ETHERIP) {
                m_freem(m);
diff -r d3f21a31651d -r 58846a5fc72c sys/netinet6/ip6_etherip.h
--- a/sys/netinet6/ip6_etherip.h        Mon Aug 23 20:56:27 2010 +0000
+++ b/sys/netinet6/ip6_etherip.h        Tue Aug 24 00:07:00 2010 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: ip6_etherip.h,v 1.1 2006/11/23 04:07:07 rpaulo Exp $        */
+/*      $NetBSD: ip6_etherip.h,v 1.2 2010/08/24 00:07:00 jakllsch Exp $        */
 
 /*
  *  Copyright (c) 2006, Hans Rosenfeld <rosenfeld%grumpf.hope-2000.org@localhost>
@@ -33,6 +33,6 @@
 #define _NETINET6_IP6_ETHERIP_H_
 
 int ip6_etherip_output(struct ifnet *, struct mbuf *);
-int ip6_etherip_input(struct mbuf *, ...);
+int ip6_etherip_input(struct mbuf **, int *, int);
 
 #endif /* !_NETINET6_IP6_ETHERIP_H_ */



Home | Main Index | Thread Index | Old Index