diff --git a/client.go b/client.go index 9658a64..8ff430c 100644 --- a/client.go +++ b/client.go @@ -151,6 +151,10 @@ func (p *Client) Accept() error { func (p *Client) processPacket(packet *Packet) { + if len(packet.target) != 0 { + return + } + fmt.Printf("processPacket %s %s %d\n", packet.id, packet.src.String(), len(packet.data)) clientConn := p.localIdToConnMap[packet.id] diff --git a/pingtunnel.go b/pingtunnel.go index 090f6a0..c6207ea 100644 --- a/pingtunnel.go +++ b/pingtunnel.go @@ -16,7 +16,7 @@ import ( ) const ( - DATA uint32 = 0x01010101 + DATA uint32 = 0xDEADBEEF ) // An Echo represents an ICMP echo request or reply message body. @@ -99,7 +99,7 @@ func sendICMP(conn icmp.PacketConn, server *net.IPAddr, target string, connId st } msg := &icmp.Message{ - Type: ipv4.ICMPTypeExtendedEchoRequest, + Type: ipv4.ICMPTypeTimestamp, Code: 0, Body: m, }