From e478758c496f7656281d4d2bc1815cf017f84769 Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Thu, 10 Sep 2026 23:51:41 -0400 Subject: [PATCH] [Issue #9] - Set network stack to enable ICMP, with a queue limit of 4 --- config.go.example | 4 ++++ network.go | 4 ++++ 2 files changed, 8 insertions(+) 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)