Module Name: src Committed By: jakllsch Date: Tue Aug 24 00:07:00 UTC 2010
Modified Files: src/sys/netinet6: in6_proto.c ip6_etherip.c ip6_etherip.h Log Message: Make the EtherIP in IPv6 input path work. XXX: Figure out if we really need a separate protosw for IPv6. To generate a diff of this commit: cvs rdiff -u -r1.88 -r1.89 src/sys/netinet6/in6_proto.c cvs rdiff -u -r1.13 -r1.14 src/sys/netinet6/ip6_etherip.c cvs rdiff -u -r1.1 -r1.2 src/sys/netinet6/ip6_etherip.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/netinet6/in6_proto.c diff -u src/sys/netinet6/in6_proto.c:1.88 src/sys/netinet6/in6_proto.c:1.89 --- src/sys/netinet6/in6_proto.c:1.88 Thu Feb 4 21:48:35 2010 +++ src/sys/netinet6/in6_proto.c Tue Aug 24 00:07:00 2010 @@ -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, Index: src/sys/netinet6/ip6_etherip.c diff -u src/sys/netinet6/ip6_etherip.c:1.13 src/sys/netinet6/ip6_etherip.c:1.14 --- src/sys/netinet6/ip6_etherip.c:1.13 Mon Apr 5 07:22:50 2010 +++ src/sys/netinet6/ip6_etherip.c Tue Aug 24 00:07:00 2010 @@ -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 <rosenf...@grumpf.hope-2000.org> @@ -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); Index: src/sys/netinet6/ip6_etherip.h diff -u src/sys/netinet6/ip6_etherip.h:1.1 src/sys/netinet6/ip6_etherip.h:1.2 --- src/sys/netinet6/ip6_etherip.h:1.1 Thu Nov 23 04:07:07 2006 +++ src/sys/netinet6/ip6_etherip.h Tue Aug 24 00:07:00 2010 @@ -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 <rosenf...@grumpf.hope-2000.org> @@ -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_ */