Fix #206: Resolve auto interface to actual interface name

- Engine.__init__ now detects actual interface when config has 'auto'
- Uses get_primary_interface() to find default route interface
- PacketCapture module updated to use detected interface with fallback
- Handles Pi Zero 2W (wlan0) and other non-eth0 systems
This commit is contained in:
Cobra
2026-04-06 11:35:52 -04:00
parent 841d43a3b3
commit 59cdda0596
2 changed files with 10 additions and 1 deletions
+2 -1
View File
@@ -23,6 +23,7 @@ from pathlib import Path
from typing import Optional
from modules.base import BaseModule
from utils.networking import get_primary_interface
logger = logging.getLogger("bb.passive.packet_capture")
@@ -62,7 +63,7 @@ class PacketCapture(BaseModule):
if self._running:
return
iface = self.config.get("interface", self.DEFAULT_INTERFACE)
iface = self.config.get("interface") or get_primary_interface() or self.DEFAULT_INTERFACE
snap_len = self.config.get("snap_length", self.DEFAULT_SNAP_LEN)
rotation = self.config.get("rotation_minutes", 60) * 60
if rotation <= 0: