diff options
author | Jörg Mayer <jmayer@loplof.de> | 2005-02-03 22:52:20 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2005-02-03 22:52:20 +0000 |
commit | 326165db2b49924788c2cc16791c192a40f37e13 (patch) | |
tree | dd9f10c1e70c26d47d646e1e753e62a4795d29de /epan/dissectors/packet-arp.c | |
parent | 9ff19a4c94351adfedb53dab9b6445786827345f (diff) | |
download | wireshark-326165db2b49924788c2cc16791c192a40f37e13.tar.gz wireshark-326165db2b49924788c2cc16791c192a40f37e13.tar.bz2 wireshark-326165db2b49924788c2cc16791c192a40f37e13.zip |
ncisco Alcoba:
Do not add target address if the packet is a Request. According to the RFC,
target addresses in requests have no meaning
svn path=/trunk/; revision=13269
Diffstat (limited to 'epan/dissectors/packet-arp.c')
-rw-r--r-- | epan/dissectors/packet-arp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/epan/dissectors/packet-arp.c b/epan/dissectors/packet-arp.c index 15d310bea9..8e38ef6cc4 100644 --- a/epan/dissectors/packet-arp.c +++ b/epan/dissectors/packet-arp.c @@ -726,9 +726,14 @@ dissect_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Add target address if target MAC address is neither a broadcast/ multicast address nor an all-zero address and if target IP address isn't all zeroes. */ + + /* Do not add target address if the packet is a Request. According to the RFC, + target addresses in requests have no meaning */ + tvb_memcpy(tvb, (guint8 *)&ip, tpa_offset, sizeof(ip)); mac = tvb_get_ptr(tvb, tha_offset, 6); - if ((mac[0] & 0x01) == 0 && memcmp(mac, mac_allzero, 6) != 0 && ip != 0) + if ((mac[0] & 0x01) == 0 && memcmp(mac, mac_allzero, 6) != 0 && ip != 0 + && ar_op != ARPOP_REQUEST) add_ether_byip(ip, mac); } |