mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #11970 from zexi/allow-bw-zero
fix(region): allow guest network zero bandwidth limit
This commit is contained in:
@@ -794,6 +794,9 @@ func (self *SGuestnetwork) IsExit() bool {
|
||||
}
|
||||
|
||||
func (self *SGuestnetwork) getBandwidth() int {
|
||||
if self.BwLimit == 0 {
|
||||
return 0
|
||||
}
|
||||
if self.BwLimit > 0 && self.BwLimit <= api.MAX_BANDWIDTH {
|
||||
return self.BwLimit
|
||||
} else {
|
||||
|
||||
@@ -49,8 +49,7 @@ type SHostOptions struct {
|
||||
EnableMonitor bool `help:"Enable monitor"`
|
||||
ReportInterval int `help:"Report interval in seconds" default:"60"`
|
||||
|
||||
EnableTcBwlimit bool `help:"Enable linux tc bandwidth limit"`
|
||||
BwDownloadBandwidth int `help:"Default ingress bandwidth in mbit (0 disabled)" default:"10"`
|
||||
BwDownloadBandwidth int `help:"Default ingress bandwidth in mbit (0 disabled)" default:"10"`
|
||||
|
||||
DnsServer string `help:"Address of host DNS server"`
|
||||
DnsServerLegacy string `help:"Deprecated Address of host DNS server"`
|
||||
|
||||
Reference in New Issue
Block a user