diff --git a/tshark.c b/tshark.c index b19cbf8dca..ee2be90fd3 100644 --- a/tshark.c +++ b/tshark.c @@ -1162,9 +1162,15 @@ main(int argc, char *argv[]) } break; case 'j': + if (protocolfilter) { + cmdarg_err("-j or -J was already specified! Overwriting previous protocol filter"); + } protocolfilter = wmem_strsplit(wmem_epan_scope(), optarg, " ", -1); break; case 'J': + if (protocolfilter) { + cmdarg_err("-j or -J was already specified! Overwriting previous protocol filter"); + } protocolfilter_flags = PF_INCLUDE_CHILDREN; protocolfilter = wmem_strsplit(wmem_epan_scope(), optarg, " ", -1); break;