diff options
author | Susant Sahani <ssahani@users.noreply.github.com> | 2016-10-18 08:49:08 +0530 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-10-17 23:19:08 -0400 |
commit | 59f62519f17d7f2da81a9abcc4002497d97c7fa8 (patch) | |
tree | d44ab36a189a0858982730d4e99847a4e5934d6f /src/network | |
parent | 52c239d770d3ef955220c5ae72b852360da67c8b (diff) |
networkd: use proper cast to access VTI6 (#4399)
Fixes #4371.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/networkd-netdev-tunnel.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/network/networkd-netdev-tunnel.c b/src/network/networkd-netdev-tunnel.c index 77a4734df8..9138ee4511 100644 --- a/src/network/networkd-netdev-tunnel.c +++ b/src/network/networkd-netdev-tunnel.c @@ -201,12 +201,18 @@ static int netdev_ip6gre_fill_message_create(NetDev *netdev, Link *link, sd_netl } static int netdev_vti_fill_message_key(NetDev *netdev, Link *link, sd_netlink_message *m) { - Tunnel *t = VTI(netdev); uint32_t ikey, okey; + Tunnel *t; int r; assert(link); assert(m); + + if (netdev->kind == NETDEV_KIND_VTI) + t = VTI(netdev); + else + t = VTI6(netdev); + assert(t); if (t->key != 0) |