There is a circumstance that I can't reliably reproduce where the call to ReadFrom in beacon.go produces a nil instance of a ControlMessage without returning an error.
If you look at these sections of the ipv4 and ipv6 libraries, you can see that they check to see if cm != nil:
There is a circumstance that I can't reliably reproduce where the call to
ReadFrom
inbeacon.go
produces anil
instance of aControlMessage
without returning an error.If you look at these sections of the
ipv4
andipv6
libraries, you can see that they check to see ifcm != nil
:In
gyre
, this causes anil
pointer dereference panic when the situation does arise:This is a trivial PR that just checks to make sure the control message is not nil before referencing its
Src
attribute.