netbirdio / netbird

Connect your devices into a secure WireGuard®-based overlay network with SSO, MFA and granular access controls.
https://netbird.io
BSD 3-Clause "New" or "Revised" License
11.24k stars 517 forks source link

[client] Allow routing to fallback to exclusion routes if rules are not supported #2909

Open lixmal opened 3 days ago

lixmal commented 3 days ago

Describe your changes

We allow this condition to match:

    rules := getSetupRules()
    for _, rule := range rules {
        if err := addRule(rule); err != nil {
            if errors.Is(err, syscall.EOPNOTSUPP) {
                log.Warnf("Rule operations are not supported, falling back to the legacy routing setup")
                setIsLegacy(true)
                return r.setupRefCounter(initAddresses, stateManager)
            }
            return nil, nil, fmt.Errorf("%s: %w", rule.description, err)
        }
    }

Issue ticket number and link

Checklist

sonarcloud[bot] commented 3 days ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud