kern/177362: Wrong control used to return TOS. [patch]
Mark Andrews
marka at isc.org
Mon Mar 25 04:10:01 UTC 2013
>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 at 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:
More information about the freebsd-bugs
mailing list