Relaybandwidthburst but no relaybandwidthrate = use too much bandwidth
If you set
RelayBandwidthBurst 2000 Kbytes
but don't set RelayBandwidthRate, you'll end up with a bandwidth line like LetoAms's:
bandwidth 5242880 2048000 5429489
It turns out we're ignoring RelayBandwidthBurst if you didn't also set RelayBandwidthRate. See this clause from connection_bucket_refill():
if (options->RelayBandwidthRate) {
relayrate = (int)options->RelayBandwidthRate;
relayburst = (int)options->RelayBandwidthBurst;
} else {
relayrate = (int)options->BandwidthRate;
relayburst = (int)options->BandwidthBurst;
}
It's kind of an edge case, but we should still fix it. The fix should either be to fail to start if RelayBandwidthBurst is non-zero but RelayBandwidthRate is 0, or to set RelayBandwidthRate to RelayBandwidthBurst in that case and continue.
The latter choice is probably better. But notice that we do the former (complain and fail to start) if you set BandwidthBurst to 2MB but leave BandwidthRate alone (so it defaults to 5MB/s).
Reported by Paul Wouters.