Skip to content

Commit

Permalink
fix crash in packetgen
Browse files Browse the repository at this point in the history
  • Loading branch information
arriven committed Apr 1, 2022
1 parent f37970d commit 6347568
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/packetgen/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ type rawConn struct {
// use ipv6 as it also supports ipv4
func openRawConn(c rawConnConfig) (*rawConn, error) {
packetConn, err := net.ListenPacket(c.Name, c.Address)
if err != nil {
return nil, err
}

return &rawConn{PacketConn: ipv6.NewPacketConn(packetConn)}, err
}
Expand Down

0 comments on commit 6347568

Please sign in to comment.