Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys change the additional arg to be passed to ip{, 6}_output ...
details: https://anonhg.NetBSD.org/src/rev/88096fbcce9b
branches: trunk
changeset: 550846:88096fbcce9b
user: itojun <itojun%NetBSD.org@localhost>
date: Fri Aug 22 21:53:01 2003 +0000
description:
change the additional arg to be passed to ip{,6}_output to struct socket *.
this fixes KAME policy lookup which was broken by the previous commit.
diffstat:
sys/net/if_gre.c | 6 +++---
sys/net/if_stf.c | 6 +++---
sys/netinet/igmp.c | 8 ++++----
sys/netinet/in_gif.c | 6 +++---
sys/netinet/ip_auth.c | 6 +++---
sys/netinet/ip_icmp.c | 6 +++---
sys/netinet/ip_input.c | 6 +++---
sys/netinet/ip_mroute.c | 10 ++++++----
sys/netinet/ip_output.c | 19 ++++++++++++-------
sys/netinet/raw_ip.c | 6 +++---
sys/netinet/tcp_input.c | 15 +++++++--------
sys/netinet/tcp_output.c | 9 ++++-----
sys/netinet/tcp_subr.c | 35 +++++++++++++++++------------------
sys/netinet/udp_usrreq.c | 6 +++---
sys/netinet6/icmp6.c | 8 ++++----
sys/netinet6/in6_gif.c | 8 ++++----
sys/netinet6/ip6_mroute.c | 6 +++---
sys/netinet6/ip6_output.c | 10 ++++------
sys/netinet6/ip6_var.h | 4 ++--
sys/netinet6/mld6.c | 6 +++---
sys/netinet6/nd6_nbr.c | 9 ++++-----
sys/netinet6/raw_ip6.c | 6 +++---
sys/netinet6/udp6_output.c | 11 ++++++-----
sys/netipsec/ipsec_output.c | 6 +++---
sys/netiso/if_eon.c | 6 +++---
sys/netiso/tp_inet.c | 6 +++---
sys/netns/ns_ip.c | 6 +++---
27 files changed, 119 insertions(+), 117 deletions(-)
diffs (truncated from 933 to 300 lines):
diff -r 236f46e544e9 -r 88096fbcce9b sys/net/if_gre.c
--- a/sys/net/if_gre.c Fri Aug 22 21:50:42 2003 +0000
+++ b/sys/net/if_gre.c Fri Aug 22 21:53:01 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_gre.c,v 1.46 2003/08/15 03:42:00 jonathan Exp $ */
+/* $NetBSD: if_gre.c,v 1.47 2003/08/22 21:53:01 itojun Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gre.c,v 1.46 2003/08/15 03:42:00 jonathan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gre.c,v 1.47 2003/08/22 21:53:01 itojun Exp $");
#include "opt_inet.h"
#include "opt_ns.h"
@@ -337,7 +337,7 @@
ifp->if_obytes += m->m_pkthdr.len;
/* send it off */
error = ip_output(m, NULL, &sc->route, 0,
- (struct ip_moptions *)0, (struct inpcb *)0);
+ (struct ip_moptions *)NULL, (struct socket *)NULL);
end:
if (error)
ifp->if_oerrors++;
diff -r 236f46e544e9 -r 88096fbcce9b sys/net/if_stf.c
--- a/sys/net/if_stf.c Fri Aug 22 21:50:42 2003 +0000
+++ b/sys/net/if_stf.c Fri Aug 22 21:53:01 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_stf.c,v 1.34 2003/08/15 03:42:00 jonathan Exp $ */
+/* $NetBSD: if_stf.c,v 1.35 2003/08/22 21:53:02 itojun Exp $ */
/* $KAME: if_stf.c,v 1.62 2001/06/07 22:32:16 itojun Exp $ */
/*
@@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_stf.c,v 1.34 2003/08/15 03:42:00 jonathan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_stf.c,v 1.35 2003/08/22 21:53:02 itojun Exp $");
#include "opt_inet.h"
@@ -466,7 +466,7 @@
ifp->if_opackets++;
return ip_output(m, NULL, &sc->sc_ro, 0,
- (struct ip_moptions *)0, (struct inpcb *)0);
+ (struct ip_moptions *)NULL, (struct socket *)NULL);
}
static int
diff -r 236f46e544e9 -r 88096fbcce9b sys/netinet/igmp.c
--- a/sys/netinet/igmp.c Fri Aug 22 21:50:42 2003 +0000
+++ b/sys/netinet/igmp.c Fri Aug 22 21:53:01 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: igmp.c,v 1.35 2003/08/15 03:42:01 jonathan Exp $ */
+/* $NetBSD: igmp.c,v 1.36 2003/08/22 21:53:02 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: igmp.c,v 1.35 2003/08/15 03:42:01 jonathan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: igmp.c,v 1.36 2003/08/22 21:53:02 itojun Exp $");
#include "opt_mrouting.h"
@@ -584,8 +584,8 @@
imo.imo_multicast_loop = 0;
#endif /* MROUTING */
- ip_output(m, (struct mbuf *)0, (struct route *)0, IP_MULTICASTOPTS,
- &imo, (struct inpcb *)0);
+ ip_output(m, (struct mbuf *)NULL, (struct route *)NULL,
+ IP_MULTICASTOPTS, &imo, (struct socket *)NULL);
++igmpstat.igps_snd_reports;
}
diff -r 236f46e544e9 -r 88096fbcce9b sys/netinet/in_gif.c
--- a/sys/netinet/in_gif.c Fri Aug 22 21:50:42 2003 +0000
+++ b/sys/netinet/in_gif.c Fri Aug 22 21:53:01 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in_gif.c,v 1.32 2002/11/11 18:35:28 itojun Exp $ */
+/* $NetBSD: in_gif.c,v 1.33 2003/08/22 21:53:03 itojun Exp $ */
/* $KAME: in_gif.c,v 1.66 2001/07/29 04:46:09 itojun Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in_gif.c,v 1.32 2002/11/11 18:35:28 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in_gif.c,v 1.33 2003/08/22 21:53:03 itojun Exp $");
#include "opt_inet.h"
#include "opt_iso.h"
@@ -208,7 +208,7 @@
}
}
- error = ip_output(m, NULL, &sc->gif_ro, 0, NULL);
+ error = ip_output(m, NULL, &sc->gif_ro, 0, NULL, NULL);
return (error);
}
diff -r 236f46e544e9 -r 88096fbcce9b sys/netinet/ip_auth.c
--- a/sys/netinet/ip_auth.c Fri Aug 22 21:50:42 2003 +0000
+++ b/sys/netinet/ip_auth.c Fri Aug 22 21:53:01 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_auth.c,v 1.31 2003/08/15 03:42:02 jonathan Exp $ */
+/* $NetBSD: ip_auth.c,v 1.32 2003/08/22 21:53:03 itojun Exp $ */
/*
* Copyright (C) 1998-2001 by Darren Reed & Guido van Rooij.
@@ -108,7 +108,7 @@
#if !defined(lint)
#if defined(__NetBSD__)
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_auth.c,v 1.31 2003/08/15 03:42:02 jonathan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_auth.c,v 1.32 2003/08/22 21:53:03 itojun Exp $");
#else
static const char rcsid[] = "@(#)Id: ip_auth.c,v 2.11.2.20 2002/06/04 14:40:42 darrenr Exp";
#endif
@@ -465,7 +465,7 @@
NULL);
# else
error = ip_output(m, NULL, &ro, IP_FORWARDING,
- (struct ip_moptions *)0, (struct inpcb *)0);
+ (struct ip_moptions *)NULL, (struct socket *)NULL);
# endif
if (ro.ro_rt) {
RTFREE(ro.ro_rt);
diff -r 236f46e544e9 -r 88096fbcce9b sys/netinet/ip_icmp.c
--- a/sys/netinet/ip_icmp.c Fri Aug 22 21:50:42 2003 +0000
+++ b/sys/netinet/ip_icmp.c Fri Aug 22 21:53:01 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_icmp.c,v 1.76 2003/08/15 03:42:02 jonathan Exp $ */
+/* $NetBSD: ip_icmp.c,v 1.77 2003/08/22 21:53:03 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -101,7 +101,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.76 2003/08/15 03:42:02 jonathan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.77 2003/08/22 21:53:03 itojun Exp $");
#include "opt_ipsec.h"
@@ -878,7 +878,7 @@
(void)ipsec_setsocket(m, NULL);
#endif
(void) ip_output(m, opts, NULL, 0,
- (struct ip_moptions *)0, (struct inpcb *)0);
+ (struct ip_moptions *)NULL, (struct socket *)NULL);
}
n_time
diff -r 236f46e544e9 -r 88096fbcce9b sys/netinet/ip_input.c
--- a/sys/netinet/ip_input.c Fri Aug 22 21:50:42 2003 +0000
+++ b/sys/netinet/ip_input.c Fri Aug 22 21:53:01 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_input.c,v 1.173 2003/08/15 03:42:02 jonathan Exp $ */
+/* $NetBSD: ip_input.c,v 1.174 2003/08/22 21:53:03 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -98,7 +98,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.173 2003/08/15 03:42:02 jonathan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.174 2003/08/22 21:53:03 itojun Exp $");
#include "opt_gateway.h"
#include "opt_pfil_hooks.h"
@@ -1742,7 +1742,7 @@
#endif
error = ip_output(m, (struct mbuf *)0, &ipforward_rt,
(IP_FORWARDING | (ip_directedbcast ? IP_ALLOWBROADCAST : 0)),
- (struct ip_moptions *)0, (struct inpcb *)0);
+ (struct ip_moptions *)NULL, (struct socket *)NULL);
if (error)
ipstat.ips_cantforward++;
diff -r 236f46e544e9 -r 88096fbcce9b sys/netinet/ip_mroute.c
--- a/sys/netinet/ip_mroute.c Fri Aug 22 21:50:42 2003 +0000
+++ b/sys/netinet/ip_mroute.c Fri Aug 22 21:53:01 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_mroute.c,v 1.77 2003/08/15 03:42:03 jonathan Exp $ */
+/* $NetBSD: ip_mroute.c,v 1.78 2003/08/22 21:53:04 itojun Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -86,7 +86,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.77 2003/08/15 03:42:03 jonathan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.78 2003/08/22 21:53:04 itojun Exp $");
#include "opt_ipsec.h"
@@ -1852,7 +1852,8 @@
(void)ipsec_setsocket(m, NULL);
#endif
ip_output(m, (struct mbuf *)0, &vifp->v_route,
- IP_FORWARDING, (struct ip_moptions *)0, (struct inpcb *)0);
+ IP_FORWARDING, (struct ip_moptions *)NULL,
+ (struct socket *)NULL);
} else {
/* if physical interface option, extract the options and then send */
struct ip_moptions imo;
@@ -1869,7 +1870,8 @@
(void)ipsec_setsocket(m, NULL);
#endif
error = ip_output(m, (struct mbuf *)0, (struct route *)0,
- IP_FORWARDING|IP_MULTICASTOPTS, &imo, (struct inpcb *)0);
+ IP_FORWARDING|IP_MULTICASTOPTS, &imo,
+ (struct socket *)NULL);
if (mrtdebug & DEBUG_XMIT)
log(LOG_DEBUG, "phyint_send on vif %ld err %d\n",
diff -r 236f46e544e9 -r 88096fbcce9b sys/netinet/ip_output.c
--- a/sys/netinet/ip_output.c Fri Aug 22 21:50:42 2003 +0000
+++ b/sys/netinet/ip_output.c Fri Aug 22 21:53:01 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_output.c,v 1.115 2003/08/22 20:29:00 jonathan Exp $ */
+/* $NetBSD: ip_output.c,v 1.116 2003/08/22 21:53:04 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -98,7 +98,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.115 2003/08/22 20:29:00 jonathan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.116 2003/08/22 21:53:04 itojun Exp $");
#include "opt_pfil_hooks.h"
#include "opt_ipsec.h"
@@ -181,13 +181,13 @@
int *mtu_p;
u_long mtu;
struct ip_moptions *imo;
- struct inpcb *inp;
+ struct socket *so;
va_list ap;
#ifdef IPSEC
- struct socket *so;
struct secpolicy *sp = NULL;
#endif /*IPSEC*/
#ifdef FAST_IPSEC
+ struct inpcb *inp;
struct m_tag *mtag;
struct secpolicy *sp = NULL;
struct tdb_ident *tdbi;
@@ -201,7 +201,7 @@
ro = va_arg(ap, struct route *);
flags = va_arg(ap, int);
imo = va_arg(ap, struct ip_moptions *);
- inp = va_arg(ap, struct inpcb *);
+ so = va_arg(ap, struct socket *);
if (flags & IP_RETURNMTU)
mtu_p = va_arg(ap, int *);
else
@@ -209,11 +209,16 @@
va_end(ap);
MCLAIM(m, &ip_tx_mowner);
+#ifdef FAST_IPSEC
+ if (so->so_proto->pr_domain->dom_family == AF_INET)
+ inp = (struct inpcb *)so->so_pcb;
+ else
+ inp = NULL;
+#endif /*IPSEC*/
#ifdef IPSEC
/* so = ipsec_getsocket(m); */
- so = ((inp == NULL) ? NULL : inp->inp_socket;
(void)ipsec_setsocket(m, NULL);
-#endif /*IPSEC*/
+#endif
#ifdef DIAGNOSTIC
if ((m->m_flags & M_PKTHDR) == 0)
diff -r 236f46e544e9 -r 88096fbcce9b sys/netinet/raw_ip.c
--- a/sys/netinet/raw_ip.c Fri Aug 22 21:50:42 2003 +0000
+++ b/sys/netinet/raw_ip.c Fri Aug 22 21:53:01 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: raw_ip.c,v 1.72 2003/08/15 03:42:03 jonathan Exp $ */
+/* $NetBSD: raw_ip.c,v 1.73 2003/08/22 21:53:05 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
Home |
Main Index |
Thread Index |
Old Index