kern/167357: cc_htcp(4) module sysctl variables overwritten

Adri Koppes adrik at salesmanager.nl
Fri Apr 27 11:00:22 UTC 2012


>Number:         167357
>Category:       kern
>Synopsis:       cc_htcp(4) module sysctl variables overwritten
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 27 11:00:21 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Adri Koppes
>Release:        8.3-RELEASE
>Organization:
SalesManager Software B.V.
>Environment:
FreeBSD mail.salesmanager.nl 8.3-RELEASE FreeBSD 8.3-RELEASE #11: Mon Apr 23 17:07:46 CEST 2012     root at mail.salesmanager.nl:/usr/obj/usr/src/sys/MAIL  amd64

>Description:
When using sysctl to change variables of the cc_htcp(4) module, changing 1 variable will also change the values of other variables.

>How-To-Repeat:
# kldload cc_htcp.ko
# sysctl net.inet.tcp.cc.htcp
net.inet.tcp.cc.htcp.rtt_scaling: 0
net.inet.tcp.cc.htcp.adaptive_backoff: 0
# sysctl net.inet.tcp.cc.htcp.rtt_scaling=1
net.inet.tcp.cc.htcp.rtt_scaling: 0 -> 1
# sysctl net.inet.tcp.cc.htcp
net.inet.tcp.cc.htcp.rtt_scaling: 1
net.inet.tcp.cc.htcp.adaptive_backoff: 0
# sysctl net.inet.tcp.cc.htcp.adaptive_backoff=1
net.inet.tcp.cc.htcp.adaptive_backoff: 0 -> 1
# sysctl net.inet.tcp.cc.htcp
net.inet.tcp.cc.htcp.rtt_scaling: 257
net.inet.tcp.cc.htcp.adaptive_backoff: 1

>Fix:
The problem is probably caused by a mismatch in variable declaration and sysctl definition in /usr/src/sys/netinet/cc/cc_htcp.c.

Line 171:

static VNET_DEFINE(uint8_t, htcp_adaptive_backoff) = 0;
static VNET_DEFINE(uint8_t, htcp_rtt_scaling) = 0;

Line 515:

SYSCTL_VNET_UINT(_net_inet_tcp_cc_htcp, OID_AUTO, adaptive_backoff, CTLFLAG_RW,
    &VNET_NAME(htcp_adaptive_backoff), 0, "enable H-TCP adaptive backoff");
SYSCTL_VNET_UINT(_net_inet_tcp_cc_htcp, OID_AUTO, rtt_scaling, CTLFLAG_RW,
    &VNET_NAME(htcp_rtt_scaling), 0, "enable H-TCP RTT scaling");


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list