summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSusant Sahani <ssahani@users.noreply.github.com>2017-02-28 15:02:22 +0530
committerMartin Pitt <martinpitt@users.noreply.github.com>2017-02-28 10:32:22 +0100
commit8999954f44dba07d7c268bcf5ab4cb26ba41cc7f (patch)
treeae691dfee27b794c905483c8bf566b55a3e2c27b /src
parent87989f0ea2201c4f0e6d14e08de6580191597da4 (diff)
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. ```
Diffstat (limited to 'src')
-rw-r--r--src/network/netdev/tunnel.c4
1 files changed, 2 insertions, 2 deletions
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;
}