]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - tc/m_connmark.c
tc: util: constrain percentage in 0-100 interval
[mirror_iproute2.git] / tc / m_connmark.c
index 45e2d05f1a9114f7df37c88ee79a11e109390bf8..eac23489fb4cacf650a02b7b208e5d712e319d6c 100644 (file)
@@ -27,8 +27,9 @@
 static void
 explain(void)
 {
-       fprintf(stderr, "Usage: ... connmark [zone ZONE] [CONTROL] [index <INDEX>]\n");
-       fprintf(stderr, "where :\n"
+       fprintf(stderr,
+               "Usage: ... connmark [zone ZONE] [CONTROL] [index <INDEX>]\n"
+               "where :\n"
                "\tZONE is the conntrack zone\n"
                "\tCONTROL := reclassify | pipe | drop | continue | ok |\n"
                "\t           goto chain <CHAIN_INDEX>\n");
@@ -73,7 +74,7 @@ parse_connmark(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
                if (matches(*argv, "zone") == 0) {
                        NEXT_ARG();
                        if (get_u16(&sel.zone, *argv, 10)) {
-                               fprintf(stderr, "simple: Illegal \"index\"\n");
+                               fprintf(stderr, "connmark: Illegal \"zone\"\n");
                                return -1;
                        }
                        argc--;
@@ -87,7 +88,7 @@ parse_connmark(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
                if (matches(*argv, "index") == 0) {
                        NEXT_ARG();
                        if (get_u32(&sel.index, *argv, 10)) {
-                               fprintf(stderr, "simple: Illegal \"index\"\n");
+                               fprintf(stderr, "connmark: Illegal \"index\"\n");
                                return -1;
                        }
                        argc--;
@@ -114,7 +115,7 @@ static int print_connmark(struct action_util *au, FILE *f, struct rtattr *arg)
 
        parse_rtattr_nested(tb, TCA_CONNMARK_MAX, arg);
        if (tb[TCA_CONNMARK_PARMS] == NULL) {
-               print_string(PRINT_FP, NULL, "%s", "[NULL connmark parameters]");
+               fprintf(stderr, "Missing connmark parameters\n");
                return -1;
        }