Skip to content

[bugfix] Autodetection: ensure that the example config can be run#429

Merged
els0r merged 4 commits intomainfrom
fix/config-for-auto
Jan 30, 2026
Merged

[bugfix] Autodetection: ensure that the example config can be run#429
els0r merged 4 commits intomainfrom
fix/config-for-auto

Conversation

@els0r
Copy link
Owner

@els0r els0r commented Jan 29, 2026

Aligns auto example config with the code.

@els0r els0r requested a review from fako1024 January 29, 2026 09:52
Copy link
Collaborator

@fako1024 fako1024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take a look at the new AutodetectionConfig, exclusion is handled there -> only need to move the pattern into there in the example config and you should be good.


// check for conflicting interface configuration
if c.AutoDetection.Enabled {
if len(c.Interfaces) > 0 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is wrong: Exclusion in auto-detection mode is handled inside the AutoDetectionConfig now, so if it's enabled there must not be any explicit interfaces configured (I added this here because otherwise you get dirty behavior, because it's not picked up).

Enabled: true,
},
Interfaces: Ifaces{
"eth0": CaptureConfig{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above, cannot have interfaces if auto-detect is on.

@@ -28,11 +34,11 @@ interfaces:
tun0:
# in autodetect mode interfaces can only be disabled (excluding them)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must go -> exclusion handled inside the autodetection part above.

// Ensure no other settings are set when capture is disabled

if c.Disable {
fmt.Println(c.RingBuffer, len(c.ExtraBPFFilters), c.Promisc, c.IgnoreVLANs)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I missed that during the last debugging!

Copy link
Collaborator

@fako1024 fako1024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed: Just adjust the example config and you should be good! TY!

@els0r els0r force-pushed the fix/config-for-auto branch from a914f5f to 9081499 Compare January 30, 2026 13:09
@els0r els0r merged commit b3a8f15 into main Jan 30, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants