[bugfix] Autodetection: ensure that the example config can be run#429
[bugfix] Autodetection: ensure that the example config can be run#429
Conversation
fako1024
left a comment
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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{ |
There was a problem hiding this comment.
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) | |||
There was a problem hiding this comment.
This must go -> exclusion handled inside the autodetection part above.
cmd/goProbe/config/config.go
Outdated
| // Ensure no other settings are set when capture is disabled | ||
|
|
||
| if c.Disable { | ||
| fmt.Println(c.RingBuffer, len(c.ExtraBPFFilters), c.Promisc, c.IgnoreVLANs) |
There was a problem hiding this comment.
Good catch, I missed that during the last debugging!
fako1024
left a comment
There was a problem hiding this comment.
As discussed: Just adjust the example config and you should be good! TY!
a914f5f to
9081499
Compare
Aligns auto example config with the code.