From 8999954f44dba07d7c268bcf5ab4cb26ba41cc7f Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Tue, 28 Feb 2017 15:02:22 +0530 Subject: networkd: fix assertion crash for tunnel, log error instead (#5465) GRE6 and IP6TNL address should be a IPv6. fix : ``` Assertion 't->family == AF_INET6' failed at src/network/netdev/tunnel.c:170, function netdev_ip6gre_fill_message_create(). Aborting. ``` --- src/network/netdev/tunnel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/network/netdev/tunnel.c b/src/network/netdev/tunnel.c index c11ac0c539..67f4fab400 100644 --- a/src/network/netdev/tunnel.c +++ b/src/network/netdev/tunnel.c @@ -410,10 +410,10 @@ static int netdev_tunnel_verify(NetDev *netdev, const char *filename) { return -EINVAL; } - if (netdev->kind == NETDEV_KIND_VTI6 && + if (IN_SET(netdev->kind, NETDEV_KIND_VTI6, NETDEV_KIND_IP6TNL, NETDEV_KIND_IP6GRE) && (t->family != AF_INET6 || in_addr_is_null(t->family, &t->local))) { log_netdev_error(netdev, - "vti6 tunnel without a local IPv4 address configured in %s. Ignoring", filename); + "vti6/ip6tnl/ip6gre tunnel without a local IPv6 address configured in %s. Ignoring", filename); return -EINVAL; } -- cgit v1.2.3-54-g00ecf