X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fnetwork%2Fnetworkd-tunnel.c;fp=src%2Fnetwork%2Fnetworkd-tunnel.c;h=bd1225942066ade6c156b3cf92beedc62c40f385;hp=cffa5644ca4c18eeb2616fd9e4d77817fc735216;hb=4826dd6850478ddec604787756db26c1ab2c106f;hpb=30ae9dfda3788cdfaf1b84d124dbc7feb638c77b diff --git a/src/network/networkd-tunnel.c b/src/network/networkd-tunnel.c index cffa5644c..bd1225942 100644 --- a/src/network/networkd-tunnel.c +++ b/src/network/networkd-tunnel.c @@ -43,6 +43,8 @@ static int netdev_fill_ipip_rtnl_message(Link *link, sd_rtnl_message *m) { netdev = link->network->tunnel; + assert(netdev->family == AF_INET); + r = sd_rtnl_message_append_string(m, IFLA_IFNAME, netdev->ifname); if (r < 0) { log_error_netdev(netdev, @@ -96,7 +98,7 @@ static int netdev_fill_ipip_rtnl_message(Link *link, sd_rtnl_message *m) { return r; } - r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_LOCAL, &netdev->local); + r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_LOCAL, &netdev->local.in); if (r < 0) { log_error_netdev(netdev, "Could not append IFLA_IPTUN_LOCAL attribute: %s", @@ -104,7 +106,7 @@ static int netdev_fill_ipip_rtnl_message(Link *link, sd_rtnl_message *m) { return r; } - r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_REMOTE, &netdev->remote); + r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_REMOTE, &netdev->remote.in); if (r < 0) { log_error_netdev(netdev, "Could not append IFLA_IPTUN_REMOTE attribute: %s", @@ -150,6 +152,8 @@ static int netdev_fill_sit_rtnl_message(Link *link, sd_rtnl_message *m) { netdev = link->network->tunnel; + assert(netdev->family == AF_INET); + r = sd_rtnl_message_append_string(m, IFLA_IFNAME, netdev->ifname); if (r < 0) { log_error_netdev(netdev, @@ -203,7 +207,7 @@ static int netdev_fill_sit_rtnl_message(Link *link, sd_rtnl_message *m) { return r; } - r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_LOCAL, &netdev->local); + r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_LOCAL, &netdev->local.in); if (r < 0) { log_error_netdev(netdev, "Could not append IFLA_IPTUN_LOCAL attribute: %s", @@ -211,7 +215,7 @@ static int netdev_fill_sit_rtnl_message(Link *link, sd_rtnl_message *m) { return r; } - r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_REMOTE, &netdev->remote); + r = sd_rtnl_message_append_in_addr(m, IFLA_IPTUN_REMOTE, &netdev->remote.in); if (r < 0) { log_error_netdev(netdev, "Could not append IFLA_IPTUN_REMOTE attribute: %s", @@ -265,6 +269,8 @@ static int netdev_fill_ipgre_rtnl_message(Link *link, sd_rtnl_message *m) { netdev = link->network->tunnel; + assert(netdev->family == AF_INET); + r = sd_rtnl_message_append_string(m, IFLA_IFNAME, netdev->ifname); if (r < 0) { log_error_netdev(netdev, @@ -318,7 +324,7 @@ static int netdev_fill_ipgre_rtnl_message(Link *link, sd_rtnl_message *m) { return r; } - r = sd_rtnl_message_append_in_addr(m, IFLA_GRE_LOCAL, &netdev->local); + r = sd_rtnl_message_append_in_addr(m, IFLA_GRE_LOCAL, &netdev->local.in); if (r < 0) { log_error_netdev(netdev, "Could not append IFLA_GRE_LOCAL attribute: %s", @@ -326,7 +332,7 @@ static int netdev_fill_ipgre_rtnl_message(Link *link, sd_rtnl_message *m) { return r; } - r = sd_rtnl_message_append_in_addr(m, IFLA_GRE_REMOTE, &netdev->remote); + r = sd_rtnl_message_append_in_addr(m, IFLA_GRE_REMOTE, &netdev->remote.in); if (r < 0) { log_error_netdev(netdev, "Could not append IFLA_GRE_REMOTE attribute: %s", @@ -380,6 +386,8 @@ static int netdev_fill_vti_rtnl_message(Link *link, sd_rtnl_message *m) { netdev = link->network->tunnel; + assert(netdev->family == AF_INET); + r = sd_rtnl_message_append_string(m, IFLA_IFNAME, netdev->ifname); if (r < 0) { log_error_netdev(netdev, @@ -433,7 +441,7 @@ static int netdev_fill_vti_rtnl_message(Link *link, sd_rtnl_message *m) { return r; } - r = sd_rtnl_message_append_in_addr(m, IFLA_VTI_LOCAL, &netdev->local); + r = sd_rtnl_message_append_in_addr(m, IFLA_VTI_LOCAL, &netdev->local.in); if (r < 0) { log_error_netdev(netdev, "Could not append IFLA_IPTUN_LOCAL attribute: %s", @@ -441,7 +449,7 @@ static int netdev_fill_vti_rtnl_message(Link *link, sd_rtnl_message *m) { return r; } - r = sd_rtnl_message_append_in_addr(m, IFLA_VTI_REMOTE, &netdev->remote); + r = sd_rtnl_message_append_in_addr(m, IFLA_VTI_REMOTE, &netdev->remote.in); if (r < 0) { log_error_netdev(netdev, "Could not append IFLA_IPTUN_REMOTE attribute: %s",