commit | 23996681074122163cfa22b185668f84935be9a9 | [log] [tgz] |
---|---|---|
author | Mikio Hara <mikioh.mikioh@gmail.com> | Wed Dec 24 12:18:10 2014 +0900 |
committer | Mikio Hara <mikioh.mikioh@gmail.com> | Thu Dec 25 12:21:07 2014 +0900 |
tree | 915e9fd39d8453563cd738205e863513aedaed59 | |
parent | b1ee7b3fbbb773e8e4b649ade000633fb867ba77 [diff] |
icmp: prevent stripping off ipv4 header twice on darwin We cannot use net.ReadFrom on darwin because a) net.ReadFrom and net.ReadFromIP unconditionally try to strip off ipv4 header due to and c) icmp.ListenPacket calls ipv4.PacketConn internally. Instead, we use ipv4.PacketConn.ReadFrom that calls net.ReadMsgIP internally to prevent icmp.ReadFrom from returning corrupted ICMP message. Fixes #9395. Change-Id: I269f3724de72bf37eb26921c251c2acb1c720fa3