From 714dabb963d0fc62a7bea0e56c02ddbfaec491fc Mon Sep 17 00:00:00 2001 From: Yoshinobu Inoue Date: Tue, 18 Jan 2000 09:02:19 +0000 Subject: [PATCH] Merge a bug fix from freebsd-current; check m != NULL before touching it, at udp6_ctlinput(). There should be kernel panic at PCCARD suspend etc, before this bug fix. Submitted by: Hajimu UMEMOTO --- sys/netinet6/udp6_usrreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 9e5c65da7a88..15ba9a2a3911 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -427,7 +427,7 @@ udp6_ctlinput(cmd, sa, d) /* translate addresses into internal form */ sa6 = *(struct sockaddr_in6 *)sa; - if (IN6_IS_ADDR_LINKLOCAL(&sa6.sin6_addr)) + if (m != NULL && IN6_IS_ADDR_LINKLOCAL(&sa6.sin6_addr)) sa6.sin6_addr.s6_addr16[1] = htons(m->m_pkthdr.rcvif->if_index); if (ip6) {