ports/84018: Bug in net/apinger port using SO_TIMESTAMP socket option

Louis Mamakos louie at transsys.com
Sun Jul 24 21:50:06 UTC 2005


>Number:         84018
>Category:       ports
>Synopsis:       Bug in net/apinger port using SO_TIMESTAMP socket option
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 24 21:50:04 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Louis Mamakos
>Release:        FreeBSD 4.11-STABLE i386
>Organization:
>Environment:
System: FreeBSD whizzo.transsys.com 4.11-STABLE FreeBSD 4.11-STABLE #20: Sun Apr 3 13:49:44 EDT 2005 louie at whizzo.transsys.com:/a/obj/usr/src/sys/WHIZZO i386


>Description:
Bug in net/apinger port.  The code which composes and received ICMP echo request/response messages is
not quite as clever as it ought to be when trying to use the Kernel's SO_TIMESTAMP socket option.  It
checks for the wrong type in the response control message.   See patch below.

>How-To-Repeat:
Inspection. 

>Fix:

*** src/icmp.c~ Thu Dec 19 03:24:33 2002
--- src/icmp.c  Sun Jul 24 17:40:01 2005
***************
*** 197,203 ****
        debug("checking CMSG...");
        for (c = CMSG_FIRSTHDR(&msg); c; c = CMSG_NXTHDR(&msg, c)) {
                debug("CMSG level: %i type: %i",c->cmsg_level,c->cmsg_type);
!               if (c->cmsg_level != SOL_SOCKET || c->cmsg_type != SO_TIMESTAMP)
                        continue;
                if (c->cmsg_len < CMSG_LEN(sizeof(struct timeval)))
                        continue;
--- 197,203 ----
        debug("checking CMSG...");
        for (c = CMSG_FIRSTHDR(&msg); c; c = CMSG_NXTHDR(&msg, c)) {
                debug("CMSG level: %i type: %i",c->cmsg_level,c->cmsg_type);
!               if (c->cmsg_level != SOL_SOCKET || c->cmsg_type != SCM_TIMESTAMP)
                        continue;
                if (c->cmsg_len < CMSG_LEN(sizeof(struct timeval)))
                        continue;



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



More information about the freebsd-ports-bugs mailing list