aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2005-02-03 22:52:20 +0000
committerJörg Mayer <jmayer@loplof.de>2005-02-03 22:52:20 +0000
commit326165db2b49924788c2cc16791c192a40f37e13 (patch)
treedd9f10c1e70c26d47d646e1e753e62a4795d29de /epan
parent9ff19a4c94351adfedb53dab9b6445786827345f (diff)
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')
-rw-r--r--epan/dissectors/packet-arp.c7
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);
}