Permalink
Browse files

bugfix: wrong packet conversion for packet filter.

  • Loading branch information...
seuffert
seuffert committed Nov 24, 2011
1 parent fd73a65 commit 757733581c1a10b705b0de0bed5d2de56652a146
Showing with 3 additions and 3 deletions.
  1. +3 −3 XBSlink/xbs_sniffer.cs
View
@@ -335,11 +335,11 @@ public void injectRemotePacket(ref byte[] data, PhysicalAddress dstMAC, Physical
// DETERMINE PACKET TYPE
if (p.PayloadPacket is IPv4Packet)
- p_ipv4 = p as IPv4Packet;
+ p_ipv4 = p.PayloadPacket as IPv4Packet;
else if (p.PayloadPacket is ARPPacket)
- p_arp = p as ARPPacket;
+ p_arp = p.PayloadPacket as ARPPacket;
else if (p.PayloadPacket is ICMPv4Packet)
- p_icmp = p as ICMPv4Packet;
+ p_icmp = p.PayloadPacket as ICMPv4Packet;
else
{
// UNKNOWN OR UNSUPPORTED PACKET TYPE

0 comments on commit 7577335

Please sign in to comment.