make sure we do not pass bogus socket pointer to IPv4 IPsec.

XXX we (KAME) are trying to invent cleaner way to pass socket pointer to
ip{,6}_output... so please permit this mess for now.
This commit is contained in:
itojun 1999-12-24 05:01:33 +00:00
parent 3150a2103c
commit 559075a711
3 changed files with 15 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_eon.c,v 1.26 1999/07/01 08:12:58 itojun Exp $ */
/* $NetBSD: if_eon.c,v 1.27 1999/12/24 05:01:33 itojun Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -71,6 +71,7 @@ SOFTWARE.
*/
#include "opt_eon.h"
#include "opt_ipsec.h"
#ifdef EON
#define NEON 1
@ -441,6 +442,9 @@ send:
}
#endif
#ifdef IPSEC
m->m_pkthdr.rcvif = NULL;
#endif
error = ip_output(m, (struct mbuf *) 0, ro, 0, NULL);
m = 0;
if (error) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: tp_inet.c,v 1.16 1998/07/05 04:37:43 jonathan Exp $ */
/* $NetBSD: tp_inet.c,v 1.17 1999/12/24 05:01:33 itojun Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -77,6 +77,7 @@ SOFTWARE.
*/
#include "opt_inet.h"
#include "opt_ipsec.h"
#include "opt_iso.h"
#ifdef INET
@ -481,6 +482,9 @@ tpip_output_dg(m0, va_alist)
}
#endif
#ifdef IPSEC
m->m_pkthdr.rcvif = NULL;
#endif
error = ip_output(m, (struct mbuf *) 0, ro, IP_ALLOWBROADCAST, NULL);
#ifdef ARGO_DEBUG

View File

@ -1,4 +1,4 @@
/* $NetBSD: ns_ip.c,v 1.23 1999/10/25 19:18:11 drochner Exp $ */
/* $NetBSD: ns_ip.c,v 1.24 1999/12/24 05:01:34 itojun Exp $ */
/*
* Copyright (c) 1984, 1985, 1986, 1987, 1993
@ -40,6 +40,7 @@
*/
#include "opt_ns.h" /* options NSIP, needed by ns_if.h */
#include "opt_ipsec.h"
#include <sys/param.h>
#include <sys/systm.h>
@ -325,6 +326,9 @@ nsipoutput(ifp, m, dst, rt)
/*
* Output final datagram.
*/
#ifdef IPSEC
m->m_pkthdr.rcvif = NULL;
#endif
error = (ip_output(m, (struct mbuf *)0, ro, SO_BROADCAST, NULL));
if (error) {
ifn->ifen_ifnet.if_oerrors++;