]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: fix assertion crash for tunnel, log error instead (#5465)
authorSusant Sahani <ssahani@users.noreply.github.com>
Tue, 28 Feb 2017 09:32:22 +0000 (15:02 +0530)
committerMartin Pitt <martinpitt@users.noreply.github.com>
Tue, 28 Feb 2017 09:32:22 +0000 (10:32 +0100)
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

index c11ac0c539abc5863d4d8cc8b6c150601937d2cb..67f4fab40026e90af80325e4040cae3b55435de4 100644 (file)
@@ -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;
         }