batadv: Fix filtering by mcast flags

The mcast tvlv flags field was incorrectly mapped to "batadv.iv_ogm.flags".
But this is the generic B.A.T.M.A.N IV's flags field and not the
specialized mcast TVLV's flag.

Just add a special field "batadv.tvlv.mcast.flags" to handle these flags.

Change-Id: Ia1f37f10d8d58146bd71ef607933f61d7dbc6e88
Fixes: 4cc4315793 ("batadv: Add dissector support for batadv v15")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Reviewed-on: https://code.wireshark.org/review/33540
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
This commit is contained in:
Sven Eckelmann 2019-06-09 19:11:37 +02:00 committed by Alexis La Goutte
parent 92d0a67f4e
commit bf854b8dcc
1 changed files with 7 additions and 1 deletions

View File

@ -633,6 +633,7 @@ static int hf_batadv_unicast_frag_flags_largetail = -1;
static int hf_batadv_iv_ogm_flags_not_best_next_hop = -1;
static int hf_batadv_iv_ogm_flags_primaries_first_hop = -1;
static int hf_batadv_iv_ogm_flags_directlink = -1;
static int hf_batadv_tvlv_mcast_flags = -1;
static int hf_batadv_tvlv_mcast_flags_unsnoopables = -1;
static int hf_batadv_tvlv_mcast_flags_ipv4 = -1;
static int hf_batadv_tvlv_mcast_flags_ipv6 = -1;
@ -3998,7 +3999,7 @@ static void dissect_batadv_tvlv_v15_mcast(tvbuff_t *tvb, packet_info *pinfo,
return;
}
proto_tree_add_bitmask(tree, tvb, offset, hf_batadv_iv_ogm_flags,
proto_tree_add_bitmask(tree, tvb, offset, hf_batadv_tvlv_mcast_flags,
ett_batadv_tvlv_mcast_flags, flags, ENC_NA);
/* 3 byte of padding. */
@ -4909,6 +4910,11 @@ void proto_register_batadv(void)
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_batadv_tvlv_mcast_flags,
{ "Flags", "batadv.tvlv.mcast.flags",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_batadv_tvlv_mcast_flags_unsnoopables,
{ "Unsnoopables", "batadv.tvlv.mcast.flags.unsnoopables",
FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x1,