Skip to content

Commit

Permalink
daemon: Enable dev auto-detect for host-fw
Browse files Browse the repository at this point in the history
Enable the device auto-detection when BPF NodePort is disabled, but
host-fw is enabled.

Signed-off-by: Martynas Pumputis <m@lambda.lt>
  • Loading branch information
brb committed Jun 12, 2020
1 parent 2e9ab34 commit 772c580
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion daemon/cmd/daemon_main.go
Expand Up @@ -1749,7 +1749,8 @@ func initKubeProxyReplacementOptions() (strict bool) {
// detectDevicesForNodePortAndHostFirewall tries to detect bpf_host devices
// (if needed).
func detectDevicesForNodePortAndHostFirewall(strict bool) {
detectNodePortDevs := option.Config.EnableNodePort && len(option.Config.Devices) == 0
detectNodePortDevs := len(option.Config.Devices) == 0 &&
(option.Config.EnableNodePort || option.Config.EnableHostFirewall)
detectDirectRoutingDev := option.Config.EnableNodePort &&
option.Config.DirectRoutingDevice == ""
if detectNodePortDevs || detectDirectRoutingDev {
Expand Down

0 comments on commit 772c580

Please sign in to comment.