Date: Mon, 25 Mar 2013 15:03:59 +1100 (EST) From: Mark Andrews <marka@isc.org> To: FreeBSD-gnats-submit@freebsd.org Subject: kern/177362: Wrong control used to return TOS. [patch] Message-ID: <201303250403.r2P43xtG049987@sex.dv.isc.org> Resent-Message-ID: <201303250410.r2P4A0AA026776@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 177362 >Category: kern >Synopsis: Wrong control used to return TOS. [patch] >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Mar 25 04:10:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Mark Andrews >Release: FreeBSD 8.4-BETA1 i386 >Organization: ISC >Environment: System: FreeBSD sex.dv.isc.org 8.4-BETA1 FreeBSD 8.4-BETA1 #25 r248493M: Tue Mar 19 21:43:37 EST 2013 marka@sex.dv.isc.org:/usr/obj/usr/src/sys/DEBUG i386 >Description: TOS is return using wrong control. It should be IP_TOS, IPPROTO_IP not IP_RECVTOS, IPPROTO_IP. The latter is the flag to turn returning the value on or off. Compare with TCLASS in IPv6. The value is returned using IPPROTO_IPV6 and IPV6_TCLASS not IPPROTO_IPV6 and IPV6_RECVTCLASS. >How-To-Repeat: >Fix: Index: sys/netinet/ip_input.c =================================================================== --- sys/netinet/ip_input.c (revision 248693) +++ sys/netinet/ip_input.c (working copy) @@ -1713,7 +1713,7 @@ } if (inp->inp_flags & INP_RECVTOS) { *mp = sbcreatecontrol((caddr_t) &ip->ip_tos, - sizeof(u_char), IP_RECVTOS, IPPROTO_IP); + sizeof(u_char), IP_TOS, IPPROTO_IP); if (*mp) mp = &(*mp)->m_next; } >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303250403.r2P43xtG049987>