Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion monitor_other.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build !(linux || windows || darwin)
//go:build !(linux || windows || darwin || freebsd)

package tun

Expand Down
2 changes: 2 additions & 0 deletions monitor_darwin.go → monitor_route_bsd.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build darwin || freebsd

package tun

import (
Expand Down
2 changes: 1 addition & 1 deletion monitor_shared.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build linux || windows || darwin
//go:build linux || windows || darwin || freebsd

package tun

Expand Down
4 changes: 2 additions & 2 deletions tun.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func (o *Options) Inet4GatewayAddr() netip.Addr {
if HasNextAddress(o.Inet4Address[0], 1) {
return o.Inet4Address[0].Addr().Next()
}
case "darwin":
case "darwin", "freebsd":
return o.Inet4Address[0].Addr()
default:
if !o.InterfaceScope {
Expand All @@ -226,7 +226,7 @@ func (o *Options) Inet6GatewayAddr() netip.Addr {
if HasNextAddress(o.Inet6Address[0], 1) {
return o.Inet6Address[0].Addr().Next()
}
case "darwin":
case "darwin", "freebsd":
return o.Inet6Address[0].Addr()
default:
if !o.InterfaceScope {
Expand Down
Loading