Date: Sun, 11 Jul 1999 15:08:12 +0200 (CEST) From: dada@sbox.tu-graz.ac.at To: FreeBSD-gnats-submit@freebsd.org Subject: kern/12594: wrong sysctl descriptions Message-ID: <199907111308.PAA00670@localhost.kfunigraz.ac.at>
next in thread | raw e-mail | index | archive | help
>Number: 12594 >Category: kern >Synopsis: wrong sysctl descriptions >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Sun Jul 11 06:20:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Martin Kammerhofer >Release: FreeBSD-current >Organization: Graz University of Technology >Environment: >Description: Some of the description strings for network related sysctls are wrong: --- src/sys/netinet/tcp_usrreq.c 1999/05/03 23:57:32 1.43 ! SYSCTL_INT(_net_inet_tcp, TCPCTL_SENDSPACE, sendspace, CTLFLAG_RW, ! &tcp_sendspace , 0, "Maximum outgoing TCP datagram size"); u_long tcp_recvspace = 1024*16; ! SYSCTL_INT(_net_inet_tcp, TCPCTL_RECVSPACE, recvspace, CTLFLAG_RW, ! &tcp_recvspace , 0, "Maximum incoming TCP datagram size"); These are default WINDOW sizes, not segment sizes. (In other words: the TCP socket reserves this much space.) It is definitely NOT the MSS (maximum segment size). Using the term 'datagram' for a TCP socket might lead to confusion, because most people associate 'datagram' with 'UDP'. --- src/sys/netinet/udp_usrreq.c 1999/05/03 23:57:32 1.51 static int log_in_vain = 0; SYSCTL_INT(_net_inet_udp, OID_AUTO, log_in_vain, CTLFLAG_RW, ! &log_in_vain, 0, "Log all incoming UDP packets"); Logs only those where nobody is listening at the local port, obviously does NOT log ALL datagrams. SYSCTL_INT(_net_inet_udp, UDPCTL_MAXDGRAM, maxdgram, CTLFLAG_RW, ! &udp_sendspace, 0, "Maximum outgoing UDP datagram size"); static u_long udp_recvspace = 40 * (1024 + sizeof(struct sockaddr_in)); SYSCTL_INT(_net_inet_udp, UDPCTL_RECVSPACE, recvspace, CTLFLAG_RW, ! &udp_recvspace, 0, "Maximum incoming UDP datagram size"); This is NOT the max datagram size, it is the socketspace again here. (In practice much less UDP data can be queued if the datagram sizes to not fit mbufs/mclusters well). --- src/sys/netinet/raw_ip.c 1999/05/03 23:57:30 1.59 ! SYSCTL_INT(_net_inet_raw, OID_AUTO, maxdgram, CTLFLAG_RW, ! &rip_sendspace, 0, "Maximum outgoing raw IP datagram size"); ! SYSCTL_INT(_net_inet_raw, OID_AUTO, recvspace, CTLFLAG_RW, ! &rip_recvspace, 0, "Maximum incoming raw IP datagram size"); Same problem here: Description suggests it's a per-packet quantity, but it's about the socket queues. --- src/sys/netinet/tcp_input.c 1999/05/03 23:57:30 1.85 static int log_in_vain = 0; SYSCTL_INT(_net_inet_tcp, OID_AUTO, log_in_vain, CTLFLAG_RW, ! &log_in_vain, 0, "Log all incoming TCP connections"); Same as with udp: Logs only those where nobody is listening. Btw log_in_vain has no rate limiting whatsoever. Enabling logging makes a machine vulnerable to a easy D.O.S. attack - just port scan it! :-\ (BTW, both log_in_vain varieties will NOT catch stealth scanning, i.e. scanning with other than SYN packets.) Please make those sysctl knobs clear and unambigous. Thinking a few seconds about good descriptions could avoid later questions and much frustration from confused users. >How-To-Repeat: grep -1 SYSCTL /src/sys/netinet/*.c | more >Fix: Put in correct descriptions. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907111308.PAA00670>