From d985da207f185f7911d6498be3e49ec92e58f53a Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 13 Aug 2024 12:25:01 -0700 Subject: [PATCH] tstest/natlab/vnet: fix one-by-one from earlier numbering change 84adfa1ba311a4ed2b 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 --- tstest/natlab/vnet/conf.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tstest/natlab/vnet/conf.go b/tstest/natlab/vnet/conf.go index 0f880694f..1703e0c12 100644 --- a/tstest/natlab/vnet/conf.go +++ b/tstest/natlab/vnet/conf.go @@ -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 }