]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r296063 r297397 r299213
authorsbruno <sbruno@FreeBSD.org>
Thu, 28 Jul 2016 20:08:01 +0000 (20:08 +0000)
committersbruno <sbruno@FreeBSD.org>
Thu, 28 Jul 2016 20:08:01 +0000 (20:08 +0000)
commit562868062bbafb1b50af65d79c593d301b5f3953
tree9589214c6a4fc5603c28e0423a8ca2fad0da5f23
parentb09e5777ab34d6c70f421ad7a7f27bc70175f4c1
MFC r296063 r297397 r299213

296063:
Lock the NDP default router list and count defrouter references.

This addresses a number of race conditions that can cause crashes as a
result of unsynchronized access to the list.

297397
Modify nd6_llinfo_timer() to acquire the nd6 lock before the LLE lock.

When expiring a neighbour cache entry we may need to look up the associated
default router, which requires the nd6 read lock. To avoid an LOR, the nd6
lock should be acquired first.

299213
Clean up callers of nd6_prelist_add().

nd6_prelist_add() sets *newp if and only if it is successful, so there's no
need for code that handles the case where the return value is 0 and
*newp == NULL. Fix some style bugs in nd6_prelist_add() while here.

Submitted by: Jason Wolfe <j@nitrology.com>
sys/netinet6/in6.c
sys/netinet6/nd6.c
sys/netinet6/nd6.h
sys/netinet6/nd6_nbr.c
sys/netinet6/nd6_rtr.c