Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/sys Pull up following revision(s) (requested by christos ...
details: https://anonhg.NetBSD.org/src/rev/d0c9ac3e0b05
branches: netbsd-6
changeset: 775417:d0c9ac3e0b05
user: riz <riz%NetBSD.org@localhost>
date: Wed Oct 31 16:07:46 2012 +0000
description:
Pull up following revision(s) (requested by christos in ticket #638):
sys/net/if_ppp.c: revision 1.137
sys/netinet6/ip6_flow.c: revision 1.20
sys/net/if_fddisubr.c: revision 1.82
sys/net/if_ethersubr.c: revision 1.192
sys/netinet6/in6_var.h: revision 1.66
sys/net/if_atmsubr.c: revision 1.50
PR/47058: Antti Kantee: If the ipv6 flow code modifies the mbuf, pass the
change up to the caller.
diffstat:
sys/net/if_atmsubr.c | 6 +++---
sys/net/if_ethersubr.c | 6 +++---
sys/net/if_fddisubr.c | 6 +++---
sys/net/if_ppp.c | 6 +++---
sys/netinet6/in6_var.h | 4 ++--
sys/netinet6/ip6_flow.c | 12 ++++++++----
6 files changed, 22 insertions(+), 18 deletions(-)
diffs (188 lines):
diff -r 2285819490f3 -r d0c9ac3e0b05 sys/net/if_atmsubr.c
--- a/sys/net/if_atmsubr.c Fri Oct 26 09:33:39 2012 +0000
+++ b/sys/net/if_atmsubr.c Wed Oct 31 16:07:46 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_atmsubr.c,v 1.49 2011/02/01 19:46:28 chuck Exp $ */
+/* $NetBSD: if_atmsubr.c,v 1.49.10.1 2012/10/31 16:07:46 riz Exp $ */
/*
* Copyright (c) 1996 Charles D. Cranor and Washington University.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_atmsubr.c,v 1.49 2011/02/01 19:46:28 chuck Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_atmsubr.c,v 1.49.10.1 2012/10/31 16:07:46 riz Exp $");
#include "opt_inet.h"
#include "opt_gateway.h"
@@ -288,7 +288,7 @@
#ifdef INET6
case ETHERTYPE_IPV6:
#ifdef GATEWAY
- if (ip6flow_fastforward(m))
+ if (ip6flow_fastforward(&m))
return;
#endif
schednetisr(NETISR_IPV6);
diff -r 2285819490f3 -r d0c9ac3e0b05 sys/net/if_ethersubr.c
--- a/sys/net/if_ethersubr.c Fri Oct 26 09:33:39 2012 +0000
+++ b/sys/net/if_ethersubr.c Wed Oct 31 16:07:46 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ethersubr.c,v 1.188.8.2 2012/08/20 19:23:07 riz Exp $ */
+/* $NetBSD: if_ethersubr.c,v 1.188.8.3 2012/10/31 16:07:46 riz Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.188.8.2 2012/08/20 19:23:07 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.188.8.3 2012/10/31 16:07:46 riz Exp $");
#include "opt_inet.h"
#include "opt_atalk.h"
@@ -915,7 +915,7 @@
#ifdef INET6
case ETHERTYPE_IPV6:
#ifdef GATEWAY
- if (ip6flow_fastforward(m))
+ if (ip6flow_fastforward(&m))
return;
#endif
schednetisr(NETISR_IPV6);
diff -r 2285819490f3 -r d0c9ac3e0b05 sys/net/if_fddisubr.c
--- a/sys/net/if_fddisubr.c Fri Oct 26 09:33:39 2012 +0000
+++ b/sys/net/if_fddisubr.c Wed Oct 31 16:07:46 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_fddisubr.c,v 1.81 2010/04/05 07:22:23 joerg Exp $ */
+/* $NetBSD: if_fddisubr.c,v 1.81.14.1 2012/10/31 16:07:46 riz Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -96,7 +96,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_fddisubr.c,v 1.81 2010/04/05 07:22:23 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_fddisubr.c,v 1.81.14.1 2012/10/31 16:07:46 riz Exp $");
#include "opt_gateway.h"
#include "opt_inet.h"
@@ -648,7 +648,7 @@
#ifdef INET6
case ETHERTYPE_IPV6:
#ifdef GATEWAY
- if (ip6flow_fastforward(m))
+ if (ip6flow_fastforward(&m))
return;
#endif
schednetisr(NETISR_IPV6);
diff -r 2285819490f3 -r d0c9ac3e0b05 sys/net/if_ppp.c
--- a/sys/net/if_ppp.c Fri Oct 26 09:33:39 2012 +0000
+++ b/sys/net/if_ppp.c Wed Oct 31 16:07:46 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ppp.c,v 1.136 2011/10/28 22:08:14 dyoung Exp $ */
+/* $NetBSD: if_ppp.c,v 1.136.8.1 2012/10/31 16:07:46 riz Exp $ */
/* Id: if_ppp.c,v 1.6 1997/03/04 03:33:00 paulus Exp */
/*
@@ -102,7 +102,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ppp.c,v 1.136 2011/10/28 22:08:14 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ppp.c,v 1.136.8.1 2012/10/31 16:07:46 riz Exp $");
#include "ppp.h"
@@ -1645,7 +1645,7 @@
m->m_data += PPP_HDRLEN;
m->m_len -= PPP_HDRLEN;
#ifdef GATEWAY
- if (ip6flow_fastforward(m))
+ if (ip6flow_fastforward(&m))
return;
#endif
schednetisr(NETISR_IPV6);
diff -r 2285819490f3 -r d0c9ac3e0b05 sys/netinet6/in6_var.h
--- a/sys/netinet6/in6_var.h Fri Oct 26 09:33:39 2012 +0000
+++ b/sys/netinet6/in6_var.h Wed Oct 31 16:07:46 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in6_var.h,v 1.64 2009/01/15 23:22:15 christos Exp $ */
+/* $NetBSD: in6_var.h,v 1.64.20.1 2012/10/31 16:07:46 riz Exp $ */
/* $KAME: in6_var.h,v 1.81 2002/06/08 11:16:51 itojun Exp $ */
/*
@@ -701,7 +701,7 @@
void in6_prefixlen2mask(struct in6_addr *, int);
void in6_purgeprefix(struct ifnet *);
-int ip6flow_fastforward(struct mbuf *); /* IPv6 fast forward routine */
+int ip6flow_fastforward(struct mbuf **); /* IPv6 fast forward routine */
int in6_src_ioctl(u_long, void *);
int in6_is_addr_deprecated(struct sockaddr_in6 *);
diff -r 2285819490f3 -r d0c9ac3e0b05 sys/netinet6/ip6_flow.c
--- a/sys/netinet6/ip6_flow.c Fri Oct 26 09:33:39 2012 +0000
+++ b/sys/netinet6/ip6_flow.c Wed Oct 31 16:07:46 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip6_flow.c,v 1.19 2012/01/19 13:19:34 liamjfoy Exp $ */
+/* $NetBSD: ip6_flow.c,v 1.19.2.1 2012/10/31 16:07:46 riz Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_flow.c,v 1.19 2012/01/19 13:19:34 liamjfoy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_flow.c,v 1.19.2.1 2012/10/31 16:07:46 riz Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -74,7 +74,7 @@
* using the cached details.
*
* Example:
- * ether/fddi_input -> ip6flow_fastfoward -> if_output
+ * ether/fddi_input -> ip6flow_fastforward -> if_output
*/
static struct pool ip6flow_pool;
@@ -208,11 +208,12 @@
* routine to deal with.
*/
int
-ip6flow_fastforward(struct mbuf *m)
+ip6flow_fastforward(struct mbuf **mp)
{
struct ip6flow *ip6f;
struct ip6_hdr *ip6;
struct rtentry *rt;
+ struct mbuf *m;
const struct sockaddr *dst;
int error;
@@ -222,6 +223,7 @@
if (!ip6_forwarding || ip6flow_inuse == 0)
return 0;
+ m = *mp;
/*
* At least size of IPv6 Header?
*/
@@ -239,10 +241,12 @@
(max_linkhdr + 3) & ~3)) == NULL) {
return 0;
}
+ *mp = m;
} else if (__predict_false(m->m_len < sizeof(struct ip6_hdr))) {
if ((m = m_pullup(m, sizeof(struct ip6_hdr))) == NULL) {
return 0;
}
+ *mp = m;
}
ip6 = mtod(m, struct ip6_hdr *);
Home |
Main Index |
Thread Index |
Old Index