feat(internal/wireguard): opportunistic kernelspace
- Auto detect if kernelspace implementation is available - Fallback to Go userspace implementation if kernel is not available
This commit is contained in:
@@ -51,7 +51,7 @@ func Test_Wireguard_addRule(t *testing.T) {
|
||||
SuppressPrefixlen: -1,
|
||||
},
|
||||
ruleAddErr: errDummy,
|
||||
err: errors.New("dummy: when adding rule: ip rule 987: from <nil> table 456"),
|
||||
err: errors.New("dummy: when adding rule: ip rule 987: from all to all table 456"),
|
||||
},
|
||||
"rule delete error": {
|
||||
expectedRule: &netlink.Rule{
|
||||
@@ -66,7 +66,7 @@ func Test_Wireguard_addRule(t *testing.T) {
|
||||
SuppressPrefixlen: -1,
|
||||
},
|
||||
ruleDelErr: errDummy,
|
||||
cleanupErr: errors.New("dummy: when deleting rule: ip rule 987: from <nil> table 456"),
|
||||
cleanupErr: errors.New("dummy: when deleting rule: ip rule 987: from all to all table 456"),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user