Fix #3236 (#3633)
authorLennart Poettering <lennart@poettering.net>
Thu, 30 Jun 2016 22:56:23 +0000 (15:56 -0700)
committerGitHub <noreply@github.com>
Thu, 30 Jun 2016 22:56:23 +0000 (15:56 -0700)
commit2cb623954f9df6bef85bca32933c75737ddc9a88
tree72c8d507796c30d083741ffa8cdd87aa290c93bc
parentf15461b2b234c178ecbbc18defaef0032a9b3431
Fix #3236 (#3633)

* networkd: condition_test() can return a negative error, handle that

If a condition check fails with an error we should not consider the check
successful. Fix that.

We should probably also improve logging in this case, but for now, let's just
unbreak this breakage.

Fixes: #3236

* condition: handle unrecognized architectures nicer

When we encounter a check for an architecture we don't know we should not
let the condition check fail with an error code, but instead simply return
false. After all the architecture might just be newer than the ones we know, in
which case it's certainly not our local one.

Fixes: #3236
src/libsystemd-network/network-internal.c
src/shared/condition.c
src/test/test-condition.c