Module Name: src
Committed By: riz
Date: Sun Nov 21 20:45:39 UTC 2010
Modified Files:
src/sys/netinet6 [netbsd-5]: in6_proto.c ip6_etherip.c ip6_etherip.h
Log Message:
Pull up following revision(s) (requested by jakllsch in ticket #1445):
sys/netinet6/ip6_etherip.h: revision 1.2
sys/netinet6/in6_proto.c: revision 1.89
sys/netinet6/ip6_etherip.c: revision 1.14
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.82 -r1.82.12.1 src/sys/netinet6/in6_proto.c
cvs rdiff -u -r1.11 -r1.11.4.1 src/sys/netinet6/ip6_etherip.c
cvs rdiff -u -r1.1 -r1.1.70.1 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.82 src/sys/netinet6/in6_proto.c:1.82.12.1
--- src/sys/netinet6/in6_proto.c:1.82 Thu Apr 24 11:38:38 2008
+++ src/sys/netinet6/in6_proto.c Sun Nov 21 20:45:39 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: in6_proto.c,v 1.82 2008/04/24 11:38:38 ad Exp $ */
+/* $NetBSD: in6_proto.c,v 1.82.12.1 2010/11/21 20:45:39 riz 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.82 2008/04/24 11:38:38 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6_proto.c,v 1.82.12.1 2010/11/21 20:45:39 riz Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -128,7 +128,7 @@
#endif
#include "etherip.h"
-#if NETHERIP > 1
+#if NETHERIP > 0
#include <netinet6/ip6_etherip.h>
#endif
@@ -333,7 +333,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.11 src/sys/netinet6/ip6_etherip.c:1.11.4.1
--- src/sys/netinet6/ip6_etherip.c:1.11 Sun Oct 19 23:28:31 2008
+++ src/sys/netinet6/ip6_etherip.c Sun Nov 21 20:45:39 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: ip6_etherip.c,v 1.11 2008/10/19 23:28:31 hans Exp $ */
+/* $NetBSD: ip6_etherip.c,v 1.11.4.1 2010/11/21 20:45:39 riz Exp $ */
/*
* Copyright (c) 2006, Hans Rosenfeld <[email protected]>
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_etherip.c,v 1.11 2008/10/19 23:28:31 hans Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_etherip.c,v 1.11.4.1 2010/11/21 20:45:39 riz Exp $");
#include "opt_inet.h"
#include "bpfilter.h"
@@ -191,19 +191,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.1.70.1
--- src/sys/netinet6/ip6_etherip.h:1.1 Thu Nov 23 04:07:07 2006
+++ src/sys/netinet6/ip6_etherip.h Sun Nov 21 20:45:39 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.1.70.1 2010/11/21 20:45:39 riz Exp $ */
/*
* Copyright (c) 2006, Hans Rosenfeld <[email protected]>
@@ -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_ */