svn commit: r366492 - head/sys/netinet
John Baldwin
jhb at FreeBSD.org
Tue Oct 6 18:02:33 UTC 2020
Author: jhb
Date: Tue Oct 6 18:02:33 2020
New Revision: 366492
URL: https://svnweb.freebsd.org/changeset/base/366492
Log:
Check if_capenable, not if_capabilities when enabling rate limiting.
if_capabilities is a read-only mask of supported capabilities.
if_capenable is a mask under administrative control via ifconfig(8).
Reviewed by: gallatin
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D26690
Modified:
head/sys/netinet/tcp_ratelimit.c
Modified: head/sys/netinet/tcp_ratelimit.c
==============================================================================
--- head/sys/netinet/tcp_ratelimit.c Tue Oct 6 17:58:56 2020 (r366491)
+++ head/sys/netinet/tcp_ratelimit.c Tue Oct 6 18:02:33 2020 (r366492)
@@ -1137,7 +1137,7 @@ tcp_rl_ifnet_link(void *arg __unused, struct ifnet *if
int error;
struct tcp_rate_set *rs;
- if (((ifp->if_capabilities & IFCAP_TXRTLMT) == 0) ||
+ if (((ifp->if_capenable & IFCAP_TXRTLMT) == 0) ||
(link_state != LINK_STATE_UP)) {
/*
* We only care on an interface going up that is rate-limit
@@ -1224,7 +1224,7 @@ tcp_set_pacing_rate(struct tcpcb *tp, struct ifnet *if
/*
* We are setting up a rate for the first time.
*/
- if ((ifp->if_capabilities & IFCAP_TXRTLMT) == 0) {
+ if ((ifp->if_capenable & IFCAP_TXRTLMT) == 0) {
/* Not supported by the egress */
if (error)
*error = ENODEV;
More information about the svn-src-all
mailing list