[Issue #9] - Set network stack to enable ICMP, with a queue limit of 4
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-09-10 23:51:41 -04:00
parent a06f269d48
commit e478758c49
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -1,6 +1,10 @@
package main package main
const ( const (
// Wi-Fi settings
WifiSSID = "MyWifiNetwork" WifiSSID = "MyWifiNetwork"
WifiPass = "MyWifiPassword" WifiPass = "MyWifiPassword"
// Network settings
EnableICMP = true
) )
+4
View File
@@ -117,11 +117,15 @@ func InitNetwork(ssid, pass string) (*NetworkStack, error) {
MaxActiveTCPPorts: 2, MaxActiveTCPPorts: 2,
MTU: uint16(framelen - ethernet.MaxOverheadSize), MTU: uint16(framelen - ethernet.MaxOverheadSize),
HardwareAddress: hwaddr, HardwareAddress: hwaddr,
ICMPQueueLimit: 4,
}) })
if err != nil { if err != nil {
return nil, fmt.Errorf("stack config reset: %w", err) return nil, fmt.Errorf("stack config reset: %w", err)
} }
// Enable network pings
_ = stack.EnableICMP(EnableICMP)
// Start background frame pump // Start background frame pump
ctx := context.Background() ctx := context.Background()
go stackLoop(ctx, stack, adapter) go stackLoop(ctx, stack, adapter)