You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ab...@apache.org on 2019/04/09 14:58:15 UTC
[mesos] branch master updated: Fix `link::lo()` to deal with `None`
value.
This is an automated email from the ASF dual-hosted git repository.
abudnik pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
The following commit(s) were added to refs/heads/master by this push:
new 0dbb535 Fix `link::lo()` to deal with `None` value.
0dbb535 is described below
commit 0dbb535fa7a6790d824c75df1b79917343403115
Author: Pavel Kirillov <49...@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;
}
}