summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKale Blankenship <kale@lemnisys.com>2016-11-07 16:29:40 -0800
committerKale Blankenship <kale@lemnisys.com>2016-11-07 16:34:54 -0800
commit2219f44b32e4c2952ca14d2755323c68d1d1b4f1 (patch)
treecd63b8cb8870fb6fe5be9b2e3bd096ce5594ef2b
parent46be7826185a558a1389a98f89525fd61054dbe8 (diff)
downloadfbtracert-2219f44b32e4c2952ca14d2755323c68d1d1b4f1.zip
fbtracert-2219f44b32e4c2952ca14d2755323c68d1d1b4f1.tar.gz
fbtracert-2219f44b32e4c2952ca14d2755323c68d1d1b4f1.tar.bz2
Re-add comments regarding TCPReciever rx buffer sizing
-rw-r--r--main.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.go b/main.go
index 7c013e3..9d52c94 100644
--- a/main.go
+++ b/main.go
@@ -126,8 +126,9 @@ func TCPReceiver(done <-chan struct{}, af string, srcAddr net.IP, targetAddr str
// IP + TCP header, this channel is fed from the socket
recv := make(chan TCPResponse)
go func() {
- ipHdrSize := 0
+ ipHdrSize := 0 // no IPv6 header present on TCP packets received on the raw socket
if af == "ip4" {
+ // IPv4 header is always included with the ipv4 raw socket receive
ipHdrSize = minIP4HeaderSize
}
packet := make([]byte, ipHdrSize+maxTCPHdrSize)