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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user