We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5f3fec commit a24ab73Copy full SHA for a24ab73
route_direct.go
@@ -1,6 +1,7 @@
1
package tun
2
3
import (
4
+ "math"
5
"net/netip"
6
"time"
7
@@ -29,7 +30,7 @@ type DirectRouteMapping struct {
29
30
}
31
32
func NewDirectRouteMapping(timeout time.Duration) *DirectRouteMapping {
- mapping := common.Must1(freelru.NewSharded[DirectRouteSession, DirectRouteDestination](1024, maphash.NewHasher[DirectRouteSession]().Hash32))
33
+ mapping := common.Must1(freelru.NewSharded[DirectRouteSession, DirectRouteDestination](math.MaxUint16, maphash.NewHasher[DirectRouteSession]().Hash32))
34
mapping.SetHealthCheck(func(session DirectRouteSession, action DirectRouteDestination) bool {
35
if action != nil {
36
return !action.IsClosed()
0 commit comments