From 77ae260c77678d8d62283d688350fbaa816ca221 Mon Sep 17 00:00:00 2001 From: konradderda <55538957+konradderda@users.noreply.github.com> Date: Mon, 6 Jan 2020 19:45:28 +0100 Subject: [PATCH] [mle] allow setting router eligible attr to false for MTD (#4450) --- src/core/thread/mle_router.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/thread/mle_router.cpp b/src/core/thread/mle_router.cpp index 46a59a179..a1619a9f2 100644 --- a/src/core/thread/mle_router.cpp +++ b/src/core/thread/mle_router.cpp @@ -106,7 +106,7 @@ otError MleRouter::SetRouterEligible(bool aEligible) { otError error = OT_ERROR_NONE; - VerifyOrExit(IsFullThreadDevice(), error = OT_ERROR_NOT_CAPABLE); + VerifyOrExit(IsFullThreadDevice() || !aEligible, error = OT_ERROR_NOT_CAPABLE); mRouterEligible = aEligible;