]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
link_ip6tnl: Use IN6ADDR_ANY_INIT to initialize local/remote endpoints
authorSerhey Popovych <serhe.popovych@gmail.com>
Mon, 18 Dec 2017 17:48:04 +0000 (19:48 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 19 Dec 2017 16:14:01 +0000 (08:14 -0800)
Use specialized helper to initialize endpoint addresses with
zeros instead of open coding this. This unifies initialization
style with other ipv6 tunnel variants (i.e. gre6 and vti6).

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
ip/link_ip6tnl.c

index 83a432030ab85982539c30a0cc8d3963543c3e30..f11ddd597da49f50befc577f0f7e9b25ccfe5eab 100644 (file)
@@ -88,8 +88,8 @@ static int ip6tunnel_parse_opt(struct link_util *lu, int argc, char **argv,
        struct rtattr *linkinfo[IFLA_INFO_MAX+1];
        struct rtattr *iptuninfo[IFLA_IPTUN_MAX + 1];
        int len;
-       struct in6_addr laddr = {};
-       struct in6_addr raddr = {};
+       struct in6_addr laddr = IN6ADDR_ANY_INIT;
+       struct in6_addr raddr = IN6ADDR_ANY_INIT;
        __u8 hop_limit = DEFAULT_TNL_HOP_LIMIT;
        __u8 encap_limit = IPV6_DEFAULT_TNL_ENCAP_LIMIT;
        __u32 flowinfo = 0;