]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Make the invalid snaplen message clearer
authorFrancois-Xavier Le Bail <[email protected]>
Mon, 10 Sep 2018 08:07:34 +0000 (10:07 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Mon, 10 Sep 2018 14:26:57 +0000 (16:26 +0200)
tcpdump.c

index 65defd0d652c1b58e8f4ccf465ec29cb021851f9..7cd076340bd51571b84a1ad875c0e55b37d2da8f 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -1709,7 +1709,8 @@ main(int argc, char **argv)
                        ndo->ndo_snaplen = strtol(optarg, &end, 0);
                        if (optarg == end || *end != '\0'
                            || ndo->ndo_snaplen < 0 || ndo->ndo_snaplen > MAXIMUM_SNAPLEN)
-                               error("invalid snaplen %s", optarg);
+                               error("invalid snaplen %s (must be >= 0 and <= %d)",
+                                     optarg, MAXIMUM_SNAPLEN);
                        break;
 
                case 'S':