Skip to content

Commit

Permalink
log sending packet
Browse files Browse the repository at this point in the history
  • Loading branch information
miolini committed Jan 30, 2016
1 parent 0937b2b commit e943f5f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion common/net_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ func (nt *NetTable) addToBlackList(h string) {
}

func (nt *NetTable) SendPacket(dstIP net.IP, payload []byte) {
nt.logger.Debug("sending packet %d bytes to %q", len(payload), dstIP.String())
srcAddr := net.IP(payload[12:16])
dstAddr := net.IP(payload[16:20])
nt.logger.Info("sending packet to %s, len %d bytes", srcAddr.String(), dstAddr.String(), len(payload))

rn := nt.RemoteNodeByIP(dstIP)
if rn == nil {
Expand Down

0 comments on commit e943f5f

Please sign in to comment.