From owner-freebsd-bugs@FreeBSD.ORG Mon Mar 25 04:10:01 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 14D7EA4D for ; Mon, 25 Mar 2013 04:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id E730381E for ; Mon, 25 Mar 2013 04:10:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r2P4A0hQ026777 for ; Mon, 25 Mar 2013 04:10:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r2P4A0AA026776; Mon, 25 Mar 2013 04:10:00 GMT (envelope-from gnats) Resent-Date: Mon, 25 Mar 2013 04:10:00 GMT Resent-Message-Id: <201303250410.r2P4A0AA026776@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Mark Andrews Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6E0EB9E7 for ; Mon, 25 Mar 2013 04:04:28 +0000 (UTC) (envelope-from marka@isc.org) Received: from mx.ams1.isc.org (mx.ams1.isc.org [IPv6:2001:500:60::65]) by mx1.freebsd.org (Postfix) with ESMTP id 2F0917F1 for ; Mon, 25 Mar 2013 04:04:27 +0000 (UTC) Received: from bikeshed.isc.org (bikeshed.isc.org [IPv6:2001:4f8:3:d::19]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mail.isc.org", Issuer "RapidSSL CA" (not verified)) by mx.ams1.isc.org (Postfix) with ESMTPS id B47825F9887 for ; Mon, 25 Mar 2013 04:04:16 +0000 (UTC) (envelope-from marka@isc.org) Received: from sex.dv.isc.org (c211-30-172-21.carlnfd1.nsw.optusnet.com.au [211.30.172.21]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bikeshed.isc.org (Postfix) with ESMTPSA id 7BEE1216C3B for ; Mon, 25 Mar 2013 04:04:14 +0000 (UTC) (envelope-from marka@isc.org) Received: from sex.dv.isc.org (localhost [127.0.0.1]) by sex.dv.isc.org (8.14.6/8.14.6) with ESMTP id r2P43xxB049988 for ; Mon, 25 Mar 2013 15:03:59 +1100 (EST) (envelope-from marka@sex.dv.isc.org) Received: (from root@localhost) by sex.dv.isc.org (8.14.6/8.14.6/Submit) id r2P43xtG049987; Mon, 25 Mar 2013 15:03:59 +1100 (EST) (envelope-from marka) Message-Id: <201303250403.r2P43xtG049987@sex.dv.isc.org> Date: Mon, 25 Mar 2013 15:03:59 +1100 (EST) From: Mark Andrews To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: kern/177362: Wrong control used to return TOS. [patch] X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Mark Andrews List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2013 04:10:01 -0000 >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: