This is an automated email from the ASF dual-hosted git repository. abudnik pushed a commit to branch 1.6.x in repository https://gitbox.apache.org/repos/asf/mesos.git
commit ee630c7f8db2e59ca92f286f246bd1b5b4f39d21 Author: Pavel Kirillov <49415588+pashakiril...@users.noreply.github.com> AuthorDate: Tue Apr 9 15:44:24 2019 +0200 Fix `link::lo()` to deal with `None` value. Some network links may cause `link::internal::test(link, IFF_LOOPBACK)` to be `None`. `Link::lo` should deal with `None` values of test var. This closes #330 --- src/linux/routing/link/link.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linux/routing/link/link.cpp b/src/linux/routing/link/link.cpp index 9dc30c5..bff172d 100644 --- a/src/linux/routing/link/link.cpp +++ b/src/linux/routing/link/link.cpp @@ -99,7 +99,7 @@ Result<string> lo() Result<bool> test = link::internal::test(link, IFF_LOOPBACK); if (test.isError()) { return Error("Failed to check the flag on link: " + link); - } else if (test.get()) { + } else if (test.isSome() && test.get()) { return link; } }