]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - ip/link_iptnl.c
Update kernel headers
[mirror_iproute2.git] / ip / link_iptnl.c
index acd9f45b40b4163129418695effc2519cd453b19..d4a56de40061523cd4436509c33a1be8e4d99fa7 100644 (file)
@@ -225,8 +225,8 @@ get_failed:
                } else if (matches(*argv, "dev") == 0) {
                        NEXT_ARG();
                        link = ll_name_to_index(*argv);
-                       if (link == 0)
-                               invarg("\"dev\" is invalid", *argv);
+                       if (!link)
+                               exit(nodev(*argv));
                } else if (strcmp(*argv, "ttl") == 0 ||
                           strcmp(*argv, "hoplimit") == 0 ||
                           strcmp(*argv, "hlim") == 0) {
@@ -325,11 +325,11 @@ get_failed:
                return 0;
        }
 
-       if (is_addrtype_inet(&saddr)) {
+       if (is_addrtype_inet_not_unspec(&saddr)) {
                addattr_l(n, 1024, IFLA_IPTUN_LOCAL,
                          saddr.data, saddr.bytelen);
        }
-       if (is_addrtype_inet(&daddr)) {
+       if (is_addrtype_inet_not_unspec(&daddr)) {
                addattr_l(n, 1024, IFLA_IPTUN_REMOTE,
                          daddr.data, daddr.bytelen);
        }
@@ -418,7 +418,7 @@ static void iptunnel_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[
                tos = rta_getattr_u8(tb[IFLA_IPTUN_TOS]);
        if (tos) {
                if (is_json_context() || tos != 1)
-                       print_0xhex(PRINT_ANY, "tos", "tos 0x%x ", tos);
+                       print_0xhex(PRINT_ANY, "tos", "tos %#llx ", tos);
                else
                        print_string(PRINT_FP, NULL, "tos %s ", "inherit");
        }
@@ -476,7 +476,7 @@ static void iptunnel_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[
 
                if (fwmark) {
                        print_0xhex(PRINT_ANY,
-                                   "fwmark", "fwmark 0x%x ", fwmark);
+                                   "fwmark", "fwmark %#llx ", fwmark);
                }
        }