Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 avoid panic on getsockopt(ICMPV6_FILTER).
details: https://anonhg.NetBSD.org/src/rev/d3e390aef167
branches: trunk
changeset: 480158:d3e390aef167
user: itojun <itojun%NetBSD.org@localhost>
date: Wed Jan 05 16:46:18 2000 +0000
description:
avoid panic on getsockopt(ICMPV6_FILTER).
diffstat:
sys/netinet6/icmp6.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (25 lines):
diff -r 1cf9e61b5443 -r d3e390aef167 sys/netinet6/icmp6.c
--- a/sys/netinet6/icmp6.c Wed Jan 05 16:33:01 2000 +0000
+++ b/sys/netinet6/icmp6.c Wed Jan 05 16:46:18 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: icmp6.c,v 1.14 2000/01/02 16:31:18 itojun Exp $ */
+/* $NetBSD: icmp6.c,v 1.15 2000/01/05 16:46:18 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -2041,11 +2041,13 @@
{
struct icmp6_filter *p;
- p = mtod(m, struct icmp6_filter *);
- if (!p || !in6p->in6p_icmp6filt) {
+ if (!in6p->in6p_icmp6filt) {
error = EINVAL;
break;
}
+ *mp = m = m_get(M_WAIT, MT_SOOPTS);
+ m->m_len = sizeof(struct icmp6_filter);
+ p = mtod(m, struct icmp6_filter *);
bcopy(in6p->in6p_icmp6filt, p,
sizeof(struct icmp6_filter));
error = 0;
Home |
Main Index |
Thread Index |
Old Index