From: Yu Watanabe Date: Tue, 1 Feb 2022 23:54:52 +0000 (+0900) Subject: network: tunnel: reorder setting ip6tnl attributes X-Git-Tag: v251-rc1~357^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=acd8abb7f9f21316fe78b637be552f4764bd85c2;p=thirdparty%2Fsystemd.git network: tunnel: reorder setting ip6tnl attributes Just for improving readability. --- diff --git a/src/network/netdev/tunnel.c b/src/network/netdev/tunnel.c index a70121efdac..336ff3c8294 100644 --- a/src/network/netdev/tunnel.c +++ b/src/network/netdev/tunnel.c @@ -587,16 +587,16 @@ static int netdev_ip6tnl_fill_message_create(NetDev *netdev, Link *link, sd_netl if (t->allow_localremote >= 0) SET_FLAG(t->flags, IP6_TNL_F_ALLOW_LOCAL_REMOTE, t->allow_localremote); + r = sd_netlink_message_append_u32(m, IFLA_IPTUN_FLAGS, t->flags); + if (r < 0) + return r; + if (t->encap_limit != 0) { r = sd_netlink_message_append_u8(m, IFLA_IPTUN_ENCAP_LIMIT, t->encap_limit); if (r < 0) return r; } - r = sd_netlink_message_append_u32(m, IFLA_IPTUN_FLAGS, t->flags); - if (r < 0) - return r; - switch (t->ip6tnl_mode) { case NETDEV_IP6_TNL_MODE_IP6IP6: proto = IPPROTO_IPV6;