diff options
author | Moshe Kaplan <me@moshekaplan.com> | 2019-08-23 18:22:18 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2019-08-24 20:18:30 +0000 |
commit | 5d12f7d597ff2e093d76a162ccd086c2efcfd15e (patch) | |
tree | 8453e33f0c1493f20d148dc1efa744c939c4d283 /tshark.c | |
parent | 976da8e7fc999b3414f83db9a8c14c7b3658e878 (diff) |
tshark: Warn on overwriting protocol filter
Change-Id: I41a56cf384cda91fa6ed217f7c292f325ec8c07f
Reviewed-on: https://code.wireshark.org/review/34345
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'tshark.c')
-rw-r--r-- | tshark.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; |