diff options
author | np <np@FreeBSD.org> | 2013-01-25 23:11:13 +0000 |
---|---|---|
committer | np <np@FreeBSD.org> | 2013-01-25 23:11:13 +0000 |
commit | 09b8766144938fcf3008f8a32c7b1b24de43adae (patch) | |
tree | 4e044c231e36544f57d96ab28951c8a36252ffa0 | |
parent | dc70c22c2b303872883d49ee9dd69dc3e5e34c2e (diff) | |
download | FreeBSD-src-09b8766144938fcf3008f8a32c7b1b24de43adae.zip FreeBSD-src-09b8766144938fcf3008f8a32c7b1b24de43adae.tar.gz |
Avoid NULL dereference in nd6_storelladdr when no mbuf is provided. It
is called this way from a couple of places in the OFED code. (toecore
calls it too but that's going to change shortly).
Reviewed by: bz@
-rw-r--r-- | sys/netinet6/nd6.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 5107f1d..0c1cd8b 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -2166,7 +2166,7 @@ nd6_storelladdr(struct ifnet *ifp, struct mbuf *m, *lle = NULL; IF_AFDATA_UNLOCK_ASSERT(ifp); - if (m->m_flags & M_MCAST) { + if (m != NULL && m->m_flags & M_MCAST) { int i; switch (ifp->if_type) { |