Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Change KAME code for ip_output()/ip6_output() to obtain ...
details: https://anonhg.NetBSD.org/src/rev/2373608e2efb
branches: trunk
changeset: 550840:2373608e2efb
user: jonathan <jonathan%NetBSD.org@localhost>
date: Fri Aug 22 20:29:00 2003 +0000
description:
Change KAME code for ip_output()/ip6_output() to obtain struct socket*
from the explicit inpcb*/in6pcb* argument. set_socket() becomes redundant.
diffstat:
sys/netinet/ip_output.c | 9 +++++----
sys/netinet6/ip6_output.c | 6 +++---
2 files changed, 8 insertions(+), 7 deletions(-)
diffs (57 lines):
diff -r 61fd403b4c6c -r 2373608e2efb sys/netinet/ip_output.c
--- a/sys/netinet/ip_output.c Fri Aug 22 20:20:09 2003 +0000
+++ b/sys/netinet/ip_output.c Fri Aug 22 20:29:00 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_output.c,v 1.114 2003/08/19 08:00:54 itojun Exp $ */
+/* $NetBSD: ip_output.c,v 1.115 2003/08/22 20:29:00 jonathan 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.114 2003/08/19 08:00:54 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.115 2003/08/22 20:29:00 jonathan Exp $");
#include "opt_pfil_hooks.h"
#include "opt_ipsec.h"
@@ -209,8 +209,9 @@
va_end(ap);
MCLAIM(m, &ip_tx_mowner);
-#ifdef IPSEC /* XXX so = ((inp == NULL) ? NULL : inp->inp_socket; */
- so = ipsec_getsocket(m);
+#ifdef IPSEC
+ /* so = ipsec_getsocket(m); */
+ so = ((inp == NULL) ? NULL : inp->inp_socket;
(void)ipsec_setsocket(m, NULL);
#endif /*IPSEC*/
diff -r 61fd403b4c6c -r 2373608e2efb sys/netinet6/ip6_output.c
--- a/sys/netinet6/ip6_output.c Fri Aug 22 20:20:09 2003 +0000
+++ b/sys/netinet6/ip6_output.c Fri Aug 22 20:29:00 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip6_output.c,v 1.63 2003/08/22 20:20:09 jonathan Exp $ */
+/* $NetBSD: ip6_output.c,v 1.64 2003/08/22 20:29:01 jonathan Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.63 2003/08/22 20:20:09 jonathan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.64 2003/08/22 20:29:01 jonathan Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -170,7 +170,7 @@
/* for AH processing. stupid to have "socket" variable in IP layer... */
/* so = ipsec_getsocket(m); */
- so = in6pcb->in6p_socket;
+ so = (in6pcb == NULL) ? NULL: in6pcb->in6p_socket;
(void)ipsec_setsocket(m, NULL);
ip6 = mtod(m, struct ip6_hdr *);
#endif /* IPSEC */
Home |
Main Index |
Thread Index |
Old Index