Skip to content

Commit 8c8c23b

Browse files
authored
Merge pull request #20400 from nirs/bootpd-check-macos-15
Fix bootpd check on macOS >= 15
2 parents 1703c9a + 62166c5 commit 8c8c23b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkg/minikube/firewall/firewall.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ func IsBootpdBlocked(cc config.ClusterConfig) bool {
4646
if regexp.MustCompile(`Firewall is disabled`).Match(out) {
4747
return false
4848
}
49+
out, err = exec.Command("/usr/libexec/ApplicationFirewall/socketfilterfw", "--getallowsigned").Output()
50+
if err != nil {
51+
// macOS < 15 or other issue: need to use --list.
52+
klog.Warningf("failed to list firewall allowedsinged option: %v", err)
53+
} else {
54+
// macOS >= 15: bootpd may be allowed as builtin software.
55+
if regexp.MustCompile(`Automatically allow built-in signed software ENABLED`).Match(out) {
56+
return false
57+
}
58+
}
4959
out, err = exec.Command("/usr/libexec/ApplicationFirewall/socketfilterfw", "--listapps").Output()
5060
if err != nil {
5161
klog.Warningf("failed to list firewall apps: %v", err)

0 commit comments

Comments
 (0)