@@ -113,7 +113,7 @@ func (nc NetworkCensored) GetDeviceIndex(name string) (i int, ok bool) {
113113func (nc NetworkCensored ) GetForwardersFor (name string ) []string {
114114 forwarders := make ([]string , 0 )
115115 for _ , ndc := range nc .Devices {
116- if slices .Contains (ndc .ForwardsFor , name ) && ndc .ForwarderAndEndpointChosen {
116+ if slices .Contains (ndc .Accessible , name ) && ndc .ForwarderAndEndpointChosen {
117117 forwarders = append (forwarders , ndc .Name )
118118 }
119119 }
@@ -196,10 +196,10 @@ type NetworkDeviceCensored struct {
196196 // Set to 0 to disable persistent keepalive.
197197 // This can be set by this peer.
198198 PersistentKeepalive goal.Duration
199- // ForwardsFor is the list of devices (in the same network) that this peer has access to, and can fowrard packets to.
199+ // Accessible is the list of devices (in the same network) that this peer has access to, and can fowrard packets to.
200200 // Note that IPv6 forwarding is not supported yet.
201201 // This can be set by this peer.
202- ForwardsFor []string
202+ Accessible []string
203203}
204204
205205type networkDeviceCensoredJSON struct {
@@ -245,7 +245,7 @@ func ipNetEqual(a, b goal.IPNet) bool {
245245}
246246
247247func (a NetworkDeviceCensored ) Equal (b NetworkDeviceCensored ) bool {
248- return a .Name == b .Name && slices .Equal (a .Endpoints , b .Endpoints ) && slices .EqualFunc (a .Addresses , b .Addresses , ipNetEqual ) && a .ListenPort == b .ListenPort && a .PublicKey == b .PublicKey && (a .PresharedKey != nil && b .PresharedKey != nil && * a .PresharedKey == * b .PresharedKey || a .PresharedKey == nil && b .PresharedKey == nil ) && a .PersistentKeepalive == b .PersistentKeepalive && slices .Equal (a .ForwardsFor , b .ForwardsFor )
248+ return a .Name == b .Name && slices .Equal (a .Endpoints , b .Endpoints ) && slices .EqualFunc (a .Addresses , b .Addresses , ipNetEqual ) && a .ListenPort == b .ListenPort && a .PublicKey == b .PublicKey && (a .PresharedKey != nil && b .PresharedKey != nil && * a .PresharedKey == * b .PresharedKey || a .PresharedKey == nil && b .PresharedKey == nil ) && a .PersistentKeepalive == b .PersistentKeepalive && slices .Equal (a .Accessible , b .Accessible )
249249}
250250
251251func (ndc NetworkDeviceCensored ) Clone () NetworkDeviceCensored {
0 commit comments