diff --git a/config.go.example b/config.go.example index c482b35..506c3e2 100644 --- a/config.go.example +++ b/config.go.example @@ -1,6 +1,10 @@ package main const ( + // Wi-Fi settings WifiSSID = "MyWifiNetwork" WifiPass = "MyWifiPassword" + + // Network settings + EnableICMP = true ) diff --git a/network.go b/network.go index f5405ea..913e25c 100644 --- a/network.go +++ b/network.go @@ -117,11 +117,15 @@ func InitNetwork(ssid, pass string) (*NetworkStack, error) { MaxActiveTCPPorts: 2, MTU: uint16(framelen - ethernet.MaxOverheadSize), HardwareAddress: hwaddr, + ICMPQueueLimit: 4, }) if err != nil { return nil, fmt.Errorf("stack config reset: %w", err) } + // Enable network pings + _ = stack.EnableICMP(EnableICMP) + // Start background frame pump ctx := context.Background() go stackLoop(ctx, stack, adapter)