x/net: IPConn.Read() Not able to read FIN/FIN-ACK/ACK packet #47946
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
didnt check, but possible on latest go lang version also
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I am trying to create raw tcp connection using dialIP().
//Creating
conn, err := net.DialIP("ip4:tcp", &localaddr, &remoteaddr)
// Sending SYN packet
packetbuf := gopacket.NewSerializeBuffer()
opts := gopacket.SerializeOptions{
FixLengths: true,
ComputeChecksums: true,
}
// Reading on connection for FIN/FINACK, as connection is closed at server side
conn.SetReadDeadline(time.Now().Add(5 * time.Second))
n, err := conn.Read(packet_data)
But couldnot capture the FIN-ACK packet, but working for SYN-ACK.
What did you expect to see?
Able to capture FIN-ACK packet
What did you see instead?
Stuck in reading bytes
The text was updated successfully, but these errors were encountered: