diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-12-02 13:24:30 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-12-09 13:55:14 -0500 |
commit | 40a922d055075b921cca060658b5b22608a36c58 (patch) | |
tree | 6f167a2ebf7e17589d172e5f69c2a0102d7e5f6a /src/network/netdev/tunnel.c | |
parent | b106c5867b77149b6be8f31e23688ae15486ad93 (diff) |
networkd: use log_netdev_error in a two more places
Diffstat (limited to 'src/network/netdev/tunnel.c')
-rw-r--r-- | src/network/netdev/tunnel.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/network/netdev/tunnel.c b/src/network/netdev/tunnel.c index b03e770061..b1f1b5a425 100644 --- a/src/network/netdev/tunnel.c +++ b/src/network/netdev/tunnel.c @@ -397,16 +397,17 @@ static int netdev_tunnel_verify(NetDev *netdev, const char *filename) { assert(t); - if (t->family != AF_INET && t->family != AF_INET6 && t->family != 0) { - log_warning("Tunnel with invalid address family configured in %s. Ignoring", filename); + if (!IN_SET(t->family, AF_INET, AF_INET6, AF_UNSPEC)) { + log_netdev_error(netdev, + "Tunnel with invalid address family configured in %s. Ignoring", filename); return -EINVAL; } - if (netdev->kind == NETDEV_KIND_IP6TNL) { - if (t->ip6tnl_mode == _NETDEV_IP6_TNL_MODE_INVALID) { - log_warning("IP6 Tunnel without mode configured in %s. Ignoring", filename); - return -EINVAL; - } + if (netdev->kind == NETDEV_KIND_IP6TNL && + t->ip6tnl_mode == _NETDEV_IP6_TNL_MODE_INVALID) { + log_netdev_error(netdev, + "ip6tnl without mode configured in %s. Ignoring", filename); + return -EINVAL; } return 0; |