Fix panic when running ICMPv4 probe with DontFragment (#686)
authorMarcelo Magallon <marcelo.magallon@gmail.com>
Sat, 29 Aug 2020 08:16:22 +0000 (02:16 -0600)
committerGitHub <noreply@github.com>
Sat, 29 Aug 2020 08:16:22 +0000 (09:16 +0100)
commit04d136fce36b2e7b3adb276b631cda1d72fb9944
tree3e008004ad6d194ee30c80edbad4ad4b76149a33
parent7913a15d3c1b225f7427e9240c63ab5075281845
Fix panic when running ICMPv4 probe with DontFragment (#686)

A recent change modified the way an IPv4 raw socket is created and BBE
is panicing when ICMPv4 is used with DontFragment set.

golang.org/x/net doesn't seem to have a way to create the necessary
socket, so fall back to the previous method for that case in particular
(ICMP, IPv4, DontFragment=true).

Fixes #685

Signed-off-by: Marcelo E. Magallon <marcelo.magallon@grafana.com>
prober/icmp.go