diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-02-06 12:03:58 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-02-06 20:04:43 +0000 |
commit | 6db88da7f7ffd7f75bb2e06e269bd28537f10ac1 (patch) | |
tree | e845296ff0abb9bea7f1e0325f636ce23f8cc694 /epan | |
parent | 7e76e5f2c865fa868b551fb974f71dade1972383 (diff) |
Change the way we infer the type of the physical address.
Use the address type of the link-layer source address, rather than the
encapsulation of the outermost packet layer, to determine the type of
the physical client address in a Dead Station frame. That should, for
example, handle cases where the actual Ethernet packets are being
carried within packets on some non-Ethernet network, or where the
packets aren't Ethernet packets but are packets on some other network
using MAC-48 addresses.
Change-Id: Ibd2e2322b03e81aa52c71b080f3c91d2f83fc3b4
Reviewed-on: https://code.wireshark.org/review/25642
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-rtnet.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/epan/dissectors/packet-rtnet.c b/epan/dissectors/packet-rtnet.c index 50635270d7..ad7c03a739 100644 --- a/epan/dissectors/packet-rtnet.c +++ b/epan/dissectors/packet-rtnet.c @@ -36,7 +36,8 @@ * * http://www.rtnet.org/ * - * http://web.archive.org/web/20141012010440/http://www.rts.uni-hannover.de/rtnet/lxr/source/Documentation/RTmac.spec + * https://github.com/iocroblab/rtnet/blob/master/Documentation/RTcfg.spec + * https://github.com/iocroblab/rtnet/blob/master/Documentation/RTmac.spec */ void proto_register_rtmac(void); @@ -862,8 +863,13 @@ dissect_rtcfg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U break; } - switch (pinfo->pkt_encap) { - case WTAP_ENCAP_ETHERNET: + /* + * Infer the type of the physical address from the type of the + * source address of this packet. + */ + switch( pinfo->dl_src.type ) + { + case AT_ETHER: proto_tree_add_bytes_format_value( rtcfg_tree, hf_rtcfg_client_hw_address, tvb, offset, 32, NULL, "%s", tvb_ether_to_str(tvb, offset)); |