From ee6326a30b8e8d93df655cb2c1dfbbf6d2b74aa8 Mon Sep 17 00:00:00 2001 From: Kip Macy Date: Wed, 24 Dec 2008 01:08:18 +0000 Subject: [PATCH] avoid lock recursion by deferring the link check until after LLE lock is dropped --- sys/netinet6/nd6_nbr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index c1cb423407c..84e415a8375 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -603,6 +603,7 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len) int is_override; char *lladdr = NULL; int lladdrlen = 0; + int checklink = 0; struct ifaddr *ifa; struct llentry *ln = NULL; union nd_opts ndopts; @@ -739,7 +740,7 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len) * non-reachable to probably reachable, and might * affect the status of associated prefixes.. */ - pfxlist_onlink_check(); + checklink = 1; } } else { int llchange; @@ -886,6 +887,9 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len) if (chain) nd6_output_flush(ifp, ifp, chain, &sin6, NULL); } + if (checklink) + pfxlist_onlink_check(); + m_freem(m); return;