Fix netip.Prefix usage

This commit is contained in:
世界 2023-10-21 12:00:00 +08:00
parent 41fd1778a7
commit 3b161ab30c
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
7 changed files with 23 additions and 47 deletions

View file

@ -253,10 +253,10 @@ func NewRouter(
var inet4Range netip.Prefix
var inet6Range netip.Prefix
if fakeIPOptions.Inet4Range != nil {
inet4Range = fakeIPOptions.Inet4Range.Build()
inet4Range = *fakeIPOptions.Inet4Range
}
if fakeIPOptions.Inet6Range != nil {
inet6Range = fakeIPOptions.Inet6Range.Build()
inet6Range = *fakeIPOptions.Inet6Range
}
router.fakeIPStore = fakeip.NewStore(router, router.logger, inet4Range, inet6Range)
}