misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
evilsocket 2018-02-16 22:33:47 +01:00
commit e36ea214a1

View file

@ -393,6 +393,10 @@ func (w *WDiscovery) updateStats(packet gopacket.Packet) {
dot11, _ := dot11Layer.(*layers.Dot11)
// FIXME: This doesn't consider the actual direction of the
// packet (which address is the source, which the destination,
// etc). It should be fixed and counter splitted into two
// separete "Recvd" and "Sent" uint64 counters.
bytes := uint64(len(packet.Data()))
w.stats.Collect(dot11.Address1, bytes)
w.stats.Collect(dot11.Address2, bytes)