Skip to content

Commit

Permalink
feat: agent sync aggregate subnet
Browse files Browse the repository at this point in the history
  • Loading branch information
askyrie committed Dec 6, 2024
1 parent 4022fd2 commit bf70584
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/controller/genesis/updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,13 @@ func (v *GenesisSyncRpcUpdater) ParseHostAsVmPlatformInfo(info VIFRPCMessage, pe
break
}
}
networkName := fmt.Sprintf("Network-%s/%v", firstIP.Address, firstIP.MaskLen)
networkIP, err := netaddr.ParseIP(firstIP.Address)
if err != nil {
log.Errorf("parse first ip (%s) err: (%s)", firstIP.Address, err.Error())
continue
}
networkPrefix := netaddr.IPPrefixFrom(networkIP, uint8(firstIP.MaskLen))
networkName := fmt.Sprintf("Network-%s", networkPrefix.Masked().String())
network, ok := nameToNetwork[networkName]
vType := common.VIF_TYPE_LAN
netType := common.NETWORK_TYPE_LAN
Expand Down

0 comments on commit bf70584

Please sign in to comment.