pktgen: make /proc/net/pktgen/pgctrl report fail on invalid input
[firefly-linux-kernel-4.4.55.git] / net / core / pktgen.c
index 167e59243feabbea2cab8faf6cbfb8c5b47765a0..676550f34560eab055e82d68d6ca0555fb431c93 100644 (file)
 #include <asm/dma.h>
 #include <asm/div64.h>         /* do_div */
 
-#define VERSION        "2.74"
+#define VERSION        "2.75"
 #define IP_NAME_SZ 32
 #define MAX_MPLS_LABELS 16 /* This is the max label stack depth */
 #define MPLS_STACK_BOTTOM htonl(0x00000100)
@@ -512,7 +512,7 @@ static ssize_t pgctrl_write(struct file *file, const char __user *buf,
                pktgen_reset_all_threads(pn);
 
        else
-               pr_warn("Unknown command: %s\n", data);
+               return -EINVAL;
 
        return count;
 }