iproute: support onelink route option and print route flags
[oweals/busybox.git] / networking / libiproute / iptunnel.c
index 5942feafc4b6d71940ccbed6953803a7a2c830a5..b54c3c53fe4cfb8692d2525886ceda7c3198184b 100644 (file)
@@ -438,7 +438,7 @@ static void print_tunnel(struct ip_tunnel_parm *p)
                        printf(" inherit");
                if (p->iph.tos & ~1)
                        printf("%c%s ", p->iph.tos & 1 ? '/' : ' ',
-                              rtnl_dsfield_n2a(p->iph.tos & ~1, b1));
+                               rtnl_dsfield_n2a(p->iph.tos & ~1, b1));
        }
        if (!(p->iph.frag_off & htons(IP_DF)))
                printf(" nopmtudisc");
@@ -561,9 +561,9 @@ int FAST_FUNC do_iptunnel(char **argv)
        enum { ARG_add = 0, ARG_change, ARG_del, ARG_show, ARG_list, ARG_lst };
 
        if (*argv) {
-               smalluint key = index_in_substrings(keywords, *argv);
-               if (key > 5)
-                       bb_error_msg_and_die(bb_msg_invalid_arg, *argv, applet_name);
+               int key = index_in_substrings(keywords, *argv);
+               if (key < 0)
+                       invarg(*argv, applet_name);
                argv++;
                if (key == ARG_add)
                        return do_add(SIOCADDTUNNEL, argv);