- if (stream != NULL && stream->mark_pool != NULL) {
- fwmark = stream->mark_pool->get_mark();
- } else {
- fwmark = 0; // No mark.
+ if (stream != NULL) {
+ if (setsockopt(sock, SOL_SOCKET, SO_MAX_PACING_RATE, &stream->pacing_rate, sizeof(stream->pacing_rate)) == -1) {
+ if (stream->pacing_rate != ~0U) {
+ log_perror("setsockopt(SO_MAX_PACING_RATE)");
+ }
+ }