summaryrefslogtreecommitdiff
path: root/src/network/networkd-netdev-vxlan.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-30 18:22:42 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-30 22:26:16 +0200
commit12ca818ffddb77eb6a0fabe369a5bcbf6994ff8b (patch)
treec8ebcdb6cc00af0e97cf16a629bf10990f8ae4d2 /src/network/networkd-netdev-vxlan.c
parent234ae0090309b5bb049f6813798bd2b4615414bc (diff)
tree-wide: clean up log_syntax() usage
- Rely everywhere that we use abs() on the error code passed in anyway, thus don't need to explicitly negate what we pass in - Never attach synthetic error number information to log messages. Only log about errors we *receive* with the error number we got there, don't log any synthetic error, that don#t even propagate, but just eat up. - Be more careful with attaching exactly the error we get, instead of errno or unrelated errors randomly. - Fix one occasion where the error number and line number got swapped. - Make sure we never tape over OOM issues, or inability to resolve specifiers
Diffstat (limited to 'src/network/networkd-netdev-vxlan.c')
-rw-r--r--src/network/networkd-netdev-vxlan.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/network/networkd-netdev-vxlan.c b/src/network/networkd-netdev-vxlan.c
index 2518e2732b..03a599c0d4 100644
--- a/src/network/networkd-netdev-vxlan.c
+++ b/src/network/networkd-netdev-vxlan.c
@@ -131,14 +131,12 @@ int config_parse_vxlan_group_address(const char *unit,
r = in_addr_from_string_auto(rvalue, &f, &buffer);
if (r < 0) {
- log_syntax(unit, LOG_ERR, filename, line, EINVAL,
- "vxlan multicast group address is invalid, ignoring assignment: %s", rvalue);
+ log_syntax(unit, LOG_ERR, filename, line, r, "vxlan multicast group address is invalid, ignoring assignment: %s", rvalue);
return 0;
}
- if(v->family != AF_UNSPEC && v->family != f) {
- log_syntax(unit, LOG_ERR, filename, line, EINVAL,
- "vxlan multicast group incompatible, ignoring assignment: %s", rvalue);
+ if (v->family != AF_UNSPEC && v->family != f) {
+ log_syntax(unit, LOG_ERR, filename, line, 0, "vxlan multicast group incompatible, ignoring assignment: %s", rvalue);
return 0;
}