tstest/natlab/vnet: fix one-by-one from earlier numbering change

84adfa1ba3 made MAC addresses 1-based too, but didn't adjust this IP address
calculation which was based on the MAC address

Updates #13038

Change-Id: Idc112b303b0b85f41fe51fd61ce1c0d8a3f0f57e
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick 2024-08-13 12:25:01 -07:00 committed by Brad Fitzpatrick
parent b26c53368d
commit d985da207f
1 changed files with 1 additions and 1 deletions

View File

@ -322,7 +322,7 @@ func (s *Server) initFromConfig(c *Config) error {
// octet 101 (for first node), 102, etc. The node number comes from the
// last octent of the MAC address (0-based)
ip4 := n.net.lanIP.Addr().As4()
ip4[3] = 101 + n.mac[5]
ip4[3] = 100 + n.mac[5]
n.lanIP = netip.AddrFrom4(ip4)
n.net.nodesByIP[n.lanIP] = n
}