Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet Fast-ipsec can call ip_output() with a null 'str...
details: https://anonhg.NetBSD.org/src/rev/86921c657152
branches: trunk
changeset: 552104:86921c657152
user: jonathan <jonathan%NetBSD.org@localhost>
date: Fri Sep 19 00:27:56 2003 +0000
description:
Fast-ipsec can call ip_output() with a null 'struct socket *so'
argument. So check so is non-NULL before doing the pointer-chasing
dance to find the PCB. (Unless and until we rework fast-ipsec and
KAME, to pass a struct in_pcbhdr * instead of the struct socket *).
diffstat:
sys/netinet/ip_output.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r ee99a74d4cda -r 86921c657152 sys/netinet/ip_output.c
--- a/sys/netinet/ip_output.c Fri Sep 19 00:16:34 2003 +0000
+++ b/sys/netinet/ip_output.c Fri Sep 19 00:27:56 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_output.c,v 1.120 2003/09/06 03:36:30 itojun Exp $ */
+/* $NetBSD: ip_output.c,v 1.121 2003/09/19 00:27:56 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.120 2003/09/06 03:36:30 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.121 2003/09/19 00:27:56 jonathan Exp $");
#include "opt_pfil_hooks.h"
#include "opt_ipsec.h"
@@ -213,7 +213,7 @@
MCLAIM(m, &ip_tx_mowner);
#ifdef FAST_IPSEC
- if (so->so_proto->pr_domain->dom_family == AF_INET)
+ if (so != NULL && so->so_proto->pr_domain->dom_family == AF_INET)
inp = (struct inpcb *)so->so_pcb;
else
inp = NULL;
Home |
Main Index |
Thread Index |
Old Index