Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys make sure we do not pass bogus socket pointer to IPv4 IP...
details: https://anonhg.NetBSD.org/src/rev/4876ad6dff5e
branches: trunk
changeset: 479872:4876ad6dff5e
user: itojun <itojun%NetBSD.org@localhost>
date: Fri Dec 24 05:01:33 1999 +0000
description:
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.
diffstat:
sys/netiso/if_eon.c | 6 +++++-
sys/netiso/tp_inet.c | 6 +++++-
sys/netns/ns_ip.c | 6 +++++-
3 files changed, 15 insertions(+), 3 deletions(-)
diffs (81 lines):
diff -r b4a28663679e -r 4876ad6dff5e sys/netiso/if_eon.c
--- a/sys/netiso/if_eon.c Fri Dec 24 01:14:01 1999 +0000
+++ b/sys/netiso/if_eon.c Fri Dec 24 05:01:33 1999 +0000
@@ -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 @@
*/
#include "opt_eon.h"
+#include "opt_ipsec.h"
#ifdef EON
#define NEON 1
@@ -441,6 +442,9 @@
}
#endif
+#ifdef IPSEC
+ m->m_pkthdr.rcvif = NULL;
+#endif
error = ip_output(m, (struct mbuf *) 0, ro, 0, NULL);
m = 0;
if (error) {
diff -r b4a28663679e -r 4876ad6dff5e sys/netiso/tp_inet.c
--- a/sys/netiso/tp_inet.c Fri Dec 24 01:14:01 1999 +0000
+++ b/sys/netiso/tp_inet.c Fri Dec 24 05:01:33 1999 +0000
@@ -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 @@
*/
#include "opt_inet.h"
+#include "opt_ipsec.h"
#include "opt_iso.h"
#ifdef INET
@@ -481,6 +482,9 @@
}
#endif
+#ifdef IPSEC
+ m->m_pkthdr.rcvif = NULL;
+#endif
error = ip_output(m, (struct mbuf *) 0, ro, IP_ALLOWBROADCAST, NULL);
#ifdef ARGO_DEBUG
diff -r b4a28663679e -r 4876ad6dff5e sys/netns/ns_ip.c
--- a/sys/netns/ns_ip.c Fri Dec 24 01:14:01 1999 +0000
+++ b/sys/netns/ns_ip.c Fri Dec 24 05:01:33 1999 +0000
@@ -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 @@
/*
* 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++;
Home |
Main Index |
Thread Index |
Old Index