Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/net/icmp: ReadFrom+"ip4:icmp" returns corrupted ICMPv4 message on darwin #9395

Closed
mikioh opened this issue Dec 19, 2014 · 1 comment
Closed

Comments

@mikioh
Copy link
Contributor

mikioh commented Dec 19, 2014

Unfortunately net.ReadFrom and ReadFromIP unconditionally drop an IPv4 header due to #7037. Also ipv4.PacketConn on darwin enables IP_STRIPHDR by default. So an IPv4 header process runs twice when we pass "ip4:icmp" to ListenPacket on Darwin.

@mikioh mikioh self-assigned this Dec 19, 2014
@mikioh mikioh added repo-net and removed repo-net labels Dec 23, 2014
@mikioh
Copy link
Contributor Author

mikioh commented Jan 1, 2015

@mikioh mikioh closed this as completed Jan 1, 2015
@mikioh mikioh changed the title x/net/icmp: ReadFrom+"ip4:icmp" returns corrupted ICMPv4 message on darwin icmp: ReadFrom+"ip4:icmp" returns corrupted ICMPv4 message on darwin Jan 4, 2015
mikioh pushed a commit that referenced this issue Jan 19, 2015
As shown in #9395, inaccurate implementation would be a cause of parsing
IPv4 header twice and corrupted upper-layer message issues.

Change-Id: Ia1a042e7ca58ee4fcb38fe9ec753c2ab100592ca
Reviewed-on: https://go-review.googlesource.com/3001
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@mikioh mikioh removed their assignment May 27, 2015
@mikioh mikioh changed the title icmp: ReadFrom+"ip4:icmp" returns corrupted ICMPv4 message on darwin x/net/icmp: ReadFrom+"ip4:icmp" returns corrupted ICMPv4 message on darwin Jul 20, 2015
@golang golang locked and limited conversation to collaborators Jul 20, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants