Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/netinet6 Pull up revision 1.63 (requested by itojun):
details: https://anonhg.NetBSD.org/src/rev/1c70c2081b1d
branches: netbsd-1-5
changeset: 491084:1c70c2081b1d
user: he <he%NetBSD.org@localhost>
date: Wed Apr 04 17:14:31 2001 +0000
description:
Pull up revision 1.63 (requested by itojun):
Make sure rcvif is sane on call to icmp6_reflect().
Fixes panic in certain configurations / instances.
diffstat:
sys/netinet6/icmp6.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diffs (25 lines):
diff -r 1dbfa0e26f1f -r 1c70c2081b1d sys/netinet6/icmp6.c
--- a/sys/netinet6/icmp6.c Wed Apr 04 17:05:14 2001 +0000
+++ b/sys/netinet6/icmp6.c Wed Apr 04 17:14:31 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: icmp6.c,v 1.33.2.8 2001/03/11 21:11:58 he Exp $ */
+/* $NetBSD: icmp6.c,v 1.33.2.9 2001/04/04 17:14:31 he Exp $ */
/* $KAME: icmp6.c,v 1.146 2000/10/01 12:37:20 itojun Exp $ */
/*
@@ -269,6 +269,15 @@
icmp6->icmp6_code = code;
icmp6->icmp6_pptr = htonl((u_int32_t)param);
+ /*
+ * icmp6_reflect() is designed to be in the input path.
+ * icmp6_error() can be called from both input and outut path,
+ * and if we are in output path rcvif could contain bogus value.
+ * clear m->m_pkthdr.rcvif for safety, we should have enough scope
+ * information in ip header (nip6).
+ */
+ m->m_pkthdr.rcvif = NULL;
+
icmp6stat.icp6s_outhist[type]++;
icmp6_reflect(m, sizeof(struct ip6_hdr)); /*header order: IPv6 - ICMPv6*/
Home |
Main Index |
Thread Index |
Old Index